Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.
| 21964 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 21965 | @dataclass |
| 21966 | class ModelSwitchToRequest: |
| 21967 | """Target model identifier and optional reasoning effort, summary, capability overrides, and |
| 21968 | context tier. |
| 21969 | """ |
| 21970 | model_id: str |
| 21971 | """Model selection id to switch to, as returned by `list`. A bare id (e.g. |
| 21972 | `claude-sonnet-4.6`) names a Copilot (CAPI) model; a provider-qualified id |
| 21973 | (`provider/id`, e.g. `acme/claude-sonnet`) targets a registry BYOK model. |
| 21974 | """ |
| 21975 | context_tier: ContextTier | None = None |
| 21976 | """Explicit context tier for the selected model. `"default"` / `"long_context"` apply the |
| 21977 | requested tier; omit this field to use normal model behavior with no explicit tier. |
| 21978 | """ |
| 21979 | model_capabilities: ModelCapabilitiesOverride | None = None |
| 21980 | """Override individual model capabilities resolved by the runtime""" |
| 21981 | |
| 21982 | reasoning_effort: str | None = None |
| 21983 | """Reasoning effort level to use for the model. "none" disables reasoning.""" |
| 21984 | |
| 21985 | reasoning_summary: ReasoningSummary | None = None |
| 21986 | """Reasoning summary mode to request for supported model clients""" |
| 21987 | |
| 21988 | @staticmethod |
| 21989 | def from_dict(obj: Any) -> 'ModelSwitchToRequest': |
| 21990 | assert isinstance(obj, dict) |
| 21991 | model_id = from_str(obj.get("modelId")) |
| 21992 | context_tier = from_union([ContextTier, from_none], obj.get("contextTier")) |
| 21993 | model_capabilities = from_union([ModelCapabilitiesOverride.from_dict, from_none], obj.get("modelCapabilities")) |
| 21994 | reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort")) |
| 21995 | reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary")) |
| 21996 | return ModelSwitchToRequest(model_id, context_tier, model_capabilities, reasoning_effort, reasoning_summary) |
| 21997 | |
| 21998 | def to_dict(self) -> dict: |
| 21999 | result: dict = {} |
| 22000 | result["modelId"] = from_str(self.model_id) |
| 22001 | if self.context_tier is not None: |
| 22002 | result["contextTier"] = from_union([lambda x: to_enum(ContextTier, x), from_none], self.context_tier) |
| 22003 | if self.model_capabilities is not None: |
| 22004 | result["modelCapabilities"] = from_union([lambda x: to_class(ModelCapabilitiesOverride, x), from_none], self.model_capabilities) |
| 22005 | if self.reasoning_effort is not None: |
| 22006 | result["reasoningEffort"] = from_union([from_str, from_none], self.reasoning_effort) |
| 22007 | if self.reasoning_summary is not None: |
| 22008 | result["reasoningSummary"] = from_union([lambda x: to_enum(ReasoningSummary, x), from_none], self.reasoning_summary) |
| 22009 | return result |
| 22010 | |
| 22011 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 22012 | class PermissionsSetAAllSource(Enum): |
no outgoing calls
searching dependent graphs…