The list of models available to this session.
| 6936 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 6937 | @dataclass |
| 6938 | class SessionModelList: |
| 6939 | """The list of models available to this session.""" |
| 6940 | |
| 6941 | list: list[Any] |
| 6942 | """Available models, ordered with the most preferred default first. Includes both Copilot |
| 6943 | (CAPI) models and any registry BYOK models; a BYOK model appears under its |
| 6944 | provider-qualified selection id (`provider/id`). |
| 6945 | """ |
| 6946 | quota_snapshots: dict[str, Any] | None = None |
| 6947 | """Per-quota snapshots returned alongside the model list, keyed by quota type.""" |
| 6948 | |
| 6949 | @staticmethod |
| 6950 | def from_dict(obj: Any) -> 'SessionModelList': |
| 6951 | assert isinstance(obj, dict) |
| 6952 | list = from_list(lambda x: x, obj.get("list")) |
| 6953 | quota_snapshots = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("quotaSnapshots")) |
| 6954 | return SessionModelList(list, quota_snapshots) |
| 6955 | |
| 6956 | def to_dict(self) -> dict: |
| 6957 | result: dict = {} |
| 6958 | result["list"] = from_list(lambda x: x, self.list) |
| 6959 | if self.quota_snapshots is not None: |
| 6960 | result["quotaSnapshots"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.quota_snapshots) |
| 6961 | return result |
| 6962 | |
| 6963 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 6964 | @dataclass |
no outgoing calls
no test coverage detected
searching dependent graphs…