Skip to content
Open
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
22 changes: 18 additions & 4 deletions python/copilot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,15 @@ async def create_session(
reasoning_effort: Reasoning effort level for the model.
tools: Custom tools to register with the session.
system_message: System message configuration.
available_tools: Allowlist of built-in tools to enable.
excluded_tools: List of built-in tools to disable.
available_tools: Allowlist of tools to enable. When specified, only
these tools will be available. Applies to the full merged tool
catalog including built-in tools, MCP tools, and custom tools
registered via ``tools=``. Custom tool names must be explicitly
included or they will be hidden from the model. Takes precedence
over ``excluded_tools``.
excluded_tools: List of tools to disable. Applies to all tools
including custom tools registered via ``tools=``. Ignored if
``available_tools`` is set.
on_user_input_request: Handler for user input requests.
hooks: Lifecycle hooks for the session.
working_directory: Working directory for the session.
Expand Down Expand Up @@ -1530,8 +1537,15 @@ async def resume_session(
reasoning_effort: Reasoning effort level for the model.
tools: Custom tools to register with the session.
system_message: System message configuration.
available_tools: Allowlist of built-in tools to enable.
excluded_tools: List of built-in tools to disable.
available_tools: Allowlist of tools to enable. When specified, only
these tools will be available. Applies to the full merged tool
catalog including built-in tools, MCP tools, and custom tools
registered via ``tools=``. Custom tool names must be explicitly
included or they will be hidden from the model. Takes precedence
over ``excluded_tools``.
excluded_tools: List of tools to disable. Applies to all tools
including custom tools registered via ``tools=``. Ignored if
``available_tools`` is set.
on_user_input_request: Handler for user input requests.
hooks: Lifecycle hooks for the session.
working_directory: Working directory for the session.
Expand Down
14 changes: 10 additions & 4 deletions python/copilot/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,12 @@ class SessionConfig(TypedDict, total=False):
reasoning_effort: ReasoningEffort
tools: list[Tool]
system_message: SystemMessageConfig # System message configuration
# List of tool names to allow (takes precedence over excluded_tools)
# List of tool names to allow. When specified, only these tools will be available.
# Applies to the full merged tool catalog (built-in, MCP, and custom tools
# registered via tools=). Takes precedence over excluded_tools.
available_tools: list[str]
# List of tool names to disable (ignored if available_tools is set)
# List of tool names to disable. Applies to all tools including custom tools
# registered via tools=. Ignored if available_tools is set.
excluded_tools: list[str]
# Handler for permission requests from the server
on_permission_request: _PermissionHandlerFn
Expand Down Expand Up @@ -919,9 +922,12 @@ class ResumeSessionConfig(TypedDict, total=False):
model: str
tools: list[Tool]
system_message: SystemMessageConfig # System message configuration
# List of tool names to allow (takes precedence over excluded_tools)
# List of tool names to allow. When specified, only these tools will be available.
# Applies to the full merged tool catalog (built-in, MCP, and custom tools
# registered via tools=). Takes precedence over excluded_tools.
available_tools: list[str]
# List of tool names to disable (ignored if available_tools is set)
# List of tool names to disable. Applies to all tools including custom tools
# registered via tools=. Ignored if available_tools is set.
excluded_tools: list[str]
provider: ProviderConfig
# Reasoning effort level for models that support it.
Expand Down
Loading