Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version: 1
generation_id: 58c21476-12d6-468a-8b78-cd527cb0c36b
openapi_spec_hash: f9e75496fa8fa86dd76892908bee2d8a
openapi_transformed_spec_hash: 93d40780edbc80f337b088768581497e
config_hash: dc8ed14ee6b29b10b22e1135ee79d527
codegen_sha: 69e9b09ef11d246e1cebce2f444dcf13150d79d3
codegen_hash: 1105715de1093af4ab7c8bba5baae70aab0b256d81acea47913f360e2b5d97b3
generation_id: e0db1179-fe12-4bb2-bd87-8631bb67d669
openapi_spec_hash: c09a996bda1329932cb3cdbc62ac2bc4
openapi_transformed_spec_hash: 877730e5c258cc3abc2cc03f2b864cbe
config_hash: 75d0b851f817c2f6384c562a88468286
codegen_sha: 4f825036970380029f250cf929e9cc688cf3f0ad
codegen_hash: 397c8644ff0580d3d2b9b974979b1679fa1fa52b0063bd2dfe2c2fe6254a88a7
115 changes: 115 additions & 0 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80002,8 +80002,83 @@ components:
type: string
enum:
- mcp
server_label:
description: A label used to identify the MCP server.
type: string
maxLength: 128
pattern: ^[A-Za-z][A-Za-z0-9_-]*$
server_url:
anyOf:
- description: The URL of the MCP server to connect to.
type: string
format: uri
- type: 'null'
server_description:
anyOf:
- description: An optional human-readable description of the MCP server.
type: string
- type: 'null'
authorization:
description: This value is omitted from returned Live session data.
writeOnly: true
anyOf:
- description: The authorization token to use when connecting to the MCP server or connector.
type: string
- type: 'null'
headers:
description: This value is omitted from returned Live session data.
writeOnly: true
anyOf:
- description: Optional HTTP headers to send when connecting to the MCP server.
type: object
additionalProperties:
type: string
- type: 'null'
allowed_tools:
anyOf:
- description: A list of MCP tool names that are allowed for this server.
anyOf:
- type: array
items:
type: string
- $ref: '#/components/schemas/LiveMCPToolFilterParam'
- type: 'null'
require_approval:
anyOf:
- description: Controls which MCP tools require explicit user approval before execution.
anyOf:
- $ref: '#/components/schemas/LiveMCPRequireApprovalFilterParam'
- description: Default approval behavior for MCP tool calls.
$ref: '#/components/schemas/LiveMCPRequireApprovalApiEnum'
- type: 'null'
connector_id:
anyOf:
- description: The ID of a built-in MCP connector. This field is deprecated for models released after September 1, 2026. Use `server_url` to connect to a remote MCP server, or `tunnel_id` to connect to a local MCP server.
deprecated: true
type: string
- type: 'null'
tunnel_id:
anyOf:
- description: The Secure MCP Tunnel ID to use instead of a direct server URL.
type: string
pattern: ^tunnel_[a-z0-9]{32}$
- type: 'null'
allowed_callers:
anyOf:
- description: The tool invocation context(s).
type: array
items:
$ref: '#/components/schemas/LiveCallableToolAllowedCaller'
minItems: 1
- type: 'null'
defer_loading:
anyOf:
- description: Whether this MCP tool should be deferred and discovered via tool search.
type: boolean
- type: 'null'
required:
- type
x-stainless-go-constant-constructor: true
LiveCustomToolInputParam:
type: object
properties:
Expand Down Expand Up @@ -113361,6 +113436,46 @@ components:
- consumed
additionalProperties: false
description: Session-wide spending limit and best-effort consumption, including unlimited sessions.
LiveMCPToolFilterParam:
type: object
properties:
tool_names:
anyOf:
- description: A list of tool names to match against.
type: array
items:
type: string
- type: 'null'
read_only:
anyOf:
- description: Whether to allow only read-only tools for matching entries.
type: boolean
- type: 'null'
required: []
LiveMCPRequireApprovalFilterParam:
type: object
properties:
always:
anyOf:
- description: A filter that forces approval for matching tools.
$ref: '#/components/schemas/LiveMCPToolFilterParam'
- type: 'null'
never:
anyOf:
- description: A filter that skips approval for matching tools.
$ref: '#/components/schemas/LiveMCPToolFilterParam'
- type: 'null'
required: []
LiveMCPRequireApprovalApiEnum:
type: string
enum:
- always
- never
LiveCallableToolAllowedCaller:
type: string
enum:
- direct
- programmatic
DecisionPromptCacheBreakpoint:
type: object
properties:
Expand Down
8 changes: 4 additions & 4 deletions scripts/castiron/generated-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -5051,19 +5051,19 @@
},
"src/openai/types/live/responses_delegation_config.py": {
"mode": "100644",
"sha256": "9acf81a3c59c90ea84fa44ae0623bda33c7c8b55b814713ec45242c5027a7c0f"
"sha256": "cecbecc89143eb9484f1d550cd16602270e4488c88bc114b22555ada9147e899"
},
"src/openai/types/live/responses_delegation_config_param.py": {
"mode": "100644",
"sha256": "033eb7569fa9975bd2adb584f645581067b068f8ff70bf93f5848278c3b02d75"
"sha256": "ae629693e0c0208368edd560257892b330d84f2df35738c582675ba8c5e0a573"
},
"src/openai/types/live/responses_delegation_update_config.py": {
"mode": "100644",
"sha256": "c0e958d70b97fe6fe67c5ae0c8bfb8b89d0a56cfccb36d0e1573faafa9334112"
"sha256": "3f5bd2717ab74e33c2d31f4925a8241643b0bf3b2d8019823238089d02ee579d"
},
"src/openai/types/live/responses_delegation_update_config_param.py": {
"mode": "100644",
"sha256": "5a13bebcc51dff57350011a07333209ce359c9e47e7f219f8c8d0ec6ecf1dfbc"
"sha256": "6b07ccfbbaa66b0f5641e12e511130abd162bdbb7a3ee6e5c6c6613c06b54bde"
},
"src/openai/types/live/server_event.py": {
"mode": "100644",
Expand Down
90 changes: 89 additions & 1 deletion src/openai/types/live/responses_delegation_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.

from typing import List, Union, Optional
from typing import Dict, List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias

from ..._utils import PropertyInfo
Expand Down Expand Up @@ -57,6 +57,12 @@
"ToolShellEnvironmentLocalSkill",
"ToolImageGeneration",
"ToolMcp",
"ToolMcpAllowedTools",
"ToolMcpAllowedToolsLiveMCPToolFilterParam",
"ToolMcpRequireApproval",
"ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParam",
"ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamAlways",
"ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamNever",
"ToolCustom",
"ToolNamespace",
"ToolSearch",
Expand Down Expand Up @@ -430,9 +436,91 @@ class ToolImageGeneration(BaseModel):
type: Literal["image_generation"]


class ToolMcpAllowedToolsLiveMCPToolFilterParam(BaseModel):
read_only: Optional[bool] = None
"""Whether to allow only read-only tools for matching entries."""

tool_names: Optional[List[str]] = None
"""A list of tool names to match against."""


ToolMcpAllowedTools: TypeAlias = Union[List[str], ToolMcpAllowedToolsLiveMCPToolFilterParam, None]


class ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamAlways(BaseModel):
"""A filter that forces approval for matching tools."""

read_only: Optional[bool] = None
"""Whether to allow only read-only tools for matching entries."""

tool_names: Optional[List[str]] = None
"""A list of tool names to match against."""


class ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamNever(BaseModel):
"""A filter that skips approval for matching tools."""

read_only: Optional[bool] = None
"""Whether to allow only read-only tools for matching entries."""

tool_names: Optional[List[str]] = None
"""A list of tool names to match against."""


class ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParam(BaseModel):
always: Optional[ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamAlways] = None
"""A filter that forces approval for matching tools."""

never: Optional[ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamNever] = None
"""A filter that skips approval for matching tools."""


ToolMcpRequireApproval: TypeAlias = Union[
ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParam, Literal["always", "never"], None
]


class ToolMcp(BaseModel):
type: Literal["mcp"]

allowed_callers: Optional[List[Literal["direct", "programmatic"]]] = None
"""The tool invocation context(s)."""

allowed_tools: Optional[ToolMcpAllowedTools] = None
"""A list of MCP tool names that are allowed for this server."""

authorization: Optional[str] = None
"""This value is omitted from returned Live session data."""

connector_id: Optional[str] = None
"""The ID of a built-in MCP connector.
This field is deprecated for models released after September 1, 2026. Use
`server_url` to connect to a remote MCP server, or `tunnel_id` to connect to a
local MCP server.
"""

defer_loading: Optional[bool] = None
"""Whether this MCP tool should be deferred and discovered via tool search."""

headers: Optional[Dict[str, str]] = None
"""Optional HTTP headers to send when connecting to the MCP server."""

require_approval: Optional[ToolMcpRequireApproval] = None
"""Controls which MCP tools require explicit user approval before execution."""

server_description: Optional[str] = None
"""An optional human-readable description of the MCP server."""

server_label: Optional[str] = None
"""A label used to identify the MCP server."""

server_url: Optional[str] = None
"""The URL of the MCP server to connect to."""

tunnel_id: Optional[str] = None
"""The Secure MCP Tunnel ID to use instead of a direct server URL."""


class ToolCustom(BaseModel):
type: Literal["custom"]
Expand Down
90 changes: 89 additions & 1 deletion src/openai/types/live/responses_delegation_config_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Union, Iterable, Optional
from typing import Dict, List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from ..._types import SequenceNotStr
Expand Down Expand Up @@ -58,6 +58,12 @@
"ToolShellEnvironmentLocalSkill",
"ToolImageGeneration",
"ToolMcp",
"ToolMcpAllowedTools",
"ToolMcpAllowedToolsLiveMCPToolFilterParam",
"ToolMcpRequireApproval",
"ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParam",
"ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamAlways",
"ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamNever",
"ToolCustom",
"ToolNamespace",
"ToolSearch",
Expand Down Expand Up @@ -421,9 +427,91 @@ class ToolImageGeneration(TypedDict, total=False):
type: Required[Literal["image_generation"]]


class ToolMcpAllowedToolsLiveMCPToolFilterParam(TypedDict, total=False):
read_only: Optional[bool]
"""Whether to allow only read-only tools for matching entries."""

tool_names: Optional[SequenceNotStr[str]]
"""A list of tool names to match against."""


ToolMcpAllowedTools: TypeAlias = Union[SequenceNotStr[str], ToolMcpAllowedToolsLiveMCPToolFilterParam]


class ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamAlways(TypedDict, total=False):
"""A filter that forces approval for matching tools."""

read_only: Optional[bool]
"""Whether to allow only read-only tools for matching entries."""

tool_names: Optional[SequenceNotStr[str]]
"""A list of tool names to match against."""


class ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamNever(TypedDict, total=False):
"""A filter that skips approval for matching tools."""

read_only: Optional[bool]
"""Whether to allow only read-only tools for matching entries."""

tool_names: Optional[SequenceNotStr[str]]
"""A list of tool names to match against."""


class ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParam(TypedDict, total=False):
always: Optional[ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamAlways]
"""A filter that forces approval for matching tools."""

never: Optional[ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParamNever]
"""A filter that skips approval for matching tools."""


ToolMcpRequireApproval: TypeAlias = Union[
ToolMcpRequireApprovalLiveMCPRequireApprovalFilterParam, Literal["always", "never"]
]


class ToolMcp(TypedDict, total=False):
type: Required[Literal["mcp"]]

allowed_callers: Optional[List[Literal["direct", "programmatic"]]]
"""The tool invocation context(s)."""

allowed_tools: Optional[ToolMcpAllowedTools]
"""A list of MCP tool names that are allowed for this server."""

authorization: Optional[str]
"""This value is omitted from returned Live session data."""

connector_id: Optional[str]
"""The ID of a built-in MCP connector.
This field is deprecated for models released after September 1, 2026. Use
`server_url` to connect to a remote MCP server, or `tunnel_id` to connect to a
local MCP server.
"""

defer_loading: Optional[bool]
"""Whether this MCP tool should be deferred and discovered via tool search."""

headers: Optional[Dict[str, str]]
"""Optional HTTP headers to send when connecting to the MCP server."""

require_approval: Optional[ToolMcpRequireApproval]
"""Controls which MCP tools require explicit user approval before execution."""

server_description: Optional[str]
"""An optional human-readable description of the MCP server."""

server_label: str
"""A label used to identify the MCP server."""

server_url: Optional[str]
"""The URL of the MCP server to connect to."""

tunnel_id: Optional[str]
"""The Secure MCP Tunnel ID to use instead of a direct server URL."""


class ToolCustom(TypedDict, total=False):
type: Required[Literal["custom"]]
Expand Down
Loading
Loading