Project Structure:
📁 lmstudio-python
├── 📁 .github
│   └── 📁 workflows
│       ├── 📄 cla.yml
│       ├── 📄 publish.yml
│       ├── 📄 scan-workflows.yml
│       └── 📄 test.yml
├── 📁 examples
│   ├── 📄 chatbot.py
│   ├── 📄 speculative-decoding.py
│   ├── 📄 structured-response.py
│   ├── 📄 terminal-sim.py
│   ├── 📄 tool-use-multiple.py
│   └── 📄 tool-use.py
├── 📁 misc
│   ├── 📄 open_client.py
│   ├── 📄 tag-release.sh
│   └── 📄 update-sdk-schema.sh
├── 📁 sdk-schema
│   ├── 📁 _templates
│   │   └── 📄 msgspec.jinja2
│   ├── 📁 lmstudio-js
│   ├── 📄 .gitignore
│   ├── 📄 lms-with-inferred-unions.json
│   ├── 📄 lms.json
│   ├── 📄 README.md
│   └── 📄 sync-sdk-schema.py
├── 📁 src
│   └── 📁 lmstudio
│       ├── 📁 _sdk_models
│       │   ├── 📄 __init__.py
│       │   └── 📄 README.md
│       ├── 📄 __init__.py
│       ├── 📄 _kv_config.py
│       ├── 📄 _logging.py
│       ├── 📄 _ws_impl.py
│       ├── 📄 async_api.py
│       ├── 📄 history.py
│       ├── 📄 json_api.py
│       ├── 📄 py.typed
│       ├── 📄 schemas.py
│       ├── 📄 sdk_api.py
│       └── 📄 sync_api.py
├── 📁 tests
│   ├── 📁 async
│   │   ├── 📄 __init__.py
│   │   ├── 📄 test_embedding_async.py
│   │   ├── 📄 test_images_async.py
│   │   ├── 📄 test_inference_async.py
│   │   ├── 📄 test_llm_async.py
│   │   ├── 📄 test_model_catalog_async.py
│   │   ├── 📄 test_model_handles_async.py
│   │   ├── 📄 test_repository_async.py
│   │   └── 📄 test_sdk_bypass_async.py
│   ├── 📁 support
│   │   ├── 📁 files
│   │   ├── 📁 lmstudio
│   │   │   └── 📄 __init__.py
│   │   └── 📄 __init__.py
│   ├── 📁 sync
│   │   ├── 📄 __init__.py
│   │   ├── 📄 test_embedding_sync.py
│   │   ├── 📄 test_images_sync.py
│   │   ├── 📄 test_inference_sync.py
│   │   ├── 📄 test_llm_sync.py
│   │   ├── 📄 test_model_catalog_sync.py
│   │   ├── 📄 test_model_handles_sync.py
│   │   ├── 📄 test_repository_sync.py
│   │   └── 📄 test_sdk_bypass_sync.py
│   ├── 📄 __init__.py
│   ├── 📄 async2sync.py
│   ├── 📄 conftest.py
│   ├── 📄 load_models.py
│   ├── 📄 README.md
│   ├── 📄 test_basics.py
│   ├── 📄 test_convenience_api.py
│   ├── 📄 test_history.py
│   ├── 📄 test_inference.py
│   ├── 📄 test_kv_config.py
│   ├── 📄 test_logging.py
│   ├── 📄 test_schemas.py
│   ├── 📄 test_session_errors.py
│   ├── 📄 test_sessions.py
│   ├── 📄 test_traceback_filtering.py
│   └── 📄 unload_models.py
├── 📄 .gitignore
├── 📄 CONTRIBUTING.md
├── 📄 LICENSE
├── 📄 lock_dev_venv.sh
├── 📄 pyproject.toml
├── 📄 README.md
└── 📄 tox.ini


<documents>
<document index="1">
<source>.github/workflows/cla.yml</source>
<document_content>
name: "CLA Assistant"

# NOTE: This workflow runs against PR *target* branches, not against the source branches.
#       This ensures modified code cannot be executed with the workflow's permissions.
#       It's still easier to misuse than most potential triggers, hence the zizmor warning.

on:
  issue_comment:
    types: [created]
  pull_request_target:  # zizmor: ignore[dangerous-triggers]
    types: [opened, closed, synchronize, labeled]  # Added "labeled" event to check for label changes
  workflow_dispatch:  # Allow manual triggering of the workflow
  
permissions:
  actions: write
  contents: read  # Signatures are stored in a dedicated repository
  pull-requests: write
  statuses: write
  checks: write

jobs:
  CLAAssistant:
    runs-on: ubuntu-latest
    steps:
      - name: "CLA Assistant"
        if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' 
        # https://github.com/contributor-assistant/github-action/releases/tag/v2.6.1
        uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_PAT }}
        with:
          path-to-signatures: 'signatures/version1/cla.json'
          path-to-document: 'https://lmstudio.ai/opensource/cla'
          remote-organization-name: lmstudio-ai
          remote-repository-name: cla-signatures
          branch: 'main'
          allowlist: yagil,ryan-the-crayon,azisislm,mattjcly,neilmehta24,ncoghlan

      - name: "Label PR as CLA Signed"
        if: success()
        run: |
          if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
            PR_NUMBER="${{ github.event.pull_request.number }}"
          elif [[ "${{ github.event_name }}" == "issue_comment" ]]; then
            PR_NUMBER="${{ github.event.issue.number }}"
          fi
          ENDPOINT="https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/labels"
          curl -L -X POST \
            -H "Accept: application/vnd.github+json" \
            -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
            -H "X-GitHub-Api-Version: 2022-11-28" \
            -d '{"labels":["CLA signed"]}' \
            $ENDPOINT
          curl -L -X DELETE \
            -H "Accept: application/vnd.github+json" \
            -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
            -H "X-GitHub-Api-Version: 2022-11-28" \
            "https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/labels/Request%20CLA" || true

</document_content>
</document>

<document index="2">
<source>.github/workflows/publish.yml</source>
<document_content>
name: Publish release

on:
  release:
    types: [published]

# Require explicit job permissions
permissions: {}

jobs:
  pypi-publish:
    name: Upload release to PyPI
    runs-on: ubuntu-latest
    permissions:
      # Allow use of GitHub OIDC for PyPI authentication
      id-token: write
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false

      # https://github.com/pdm-project/setup-pdm/releases/tag/v4.4
      - uses: pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0
        with:
          python-version: 3.12
          cache: true

      - name: Publish distribution package to PyPI
        run: pdm publish

</document_content>
</document>

<document index="3">
<source>.github/workflows/scan-workflows.yml</source>
<document_content>
name: Scan workflows

on:
    pull_request:
      branches:
        - "**"
      paths:
        # Run for changes to *any* workflow file
        - ".github/workflows/*.yml"
    push:
      branches:
        - main

# Require explicit job permissions
permissions: {}

jobs:
  zizmor:
    name: zizmor latest via PyPI
    runs-on: ubuntu-latest
    permissions:
      security-events: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false

      - name: Install the latest version of uv
        # https://github.com/astral-sh/setup-uv/releases/tag/v6.1.0
        uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb

      - name: Run zizmor 🌈
        # Only scan this repo's workflows, not anything in submodules
        run: uvx zizmor==1.8.0 --format sarif .github > results.sarif
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Upload SARIF file
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif
          category: zizmor

</document_content>
</document>

<document index="4">
<source>.github/workflows/test.yml</source>
<document_content>
name: Test

on:
  pull_request:
    branches:
      - "**"
    paths:
      # Run for changes to *this* workflow file, but not for other workflows
      - ".github/workflows/test.yml"
      # Trigger off all top level files by default
      - "*"
      # Trigger off source, test, and ci changes
      # (API schema changes only matter when the generated data model code changes)
      - "src/**"
      - "tests/**"
      - "ci/**"
      # Python scripts under misc still need linting & typechecks
      - "misc/**.py"
      # Skip running the source code checks when only documentation has been updated
      - "!**.md"
      - "!**.rst"
      - "!**.txt"  # Any requirements file changes will also involve changing other files
  push:
    branches:
      - main

# Require explicit job permissions
permissions: {}

defaults:
  run:
    # Use the Git for Windows bash shell, rather than supporting Powershell
    # This also implies `set -eo pipefail` (rather than just `set -e`)
    shell: bash

jobs:
  tests:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false  # Always report results for all targets
      max-parallel: 8
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13"]
        # There's no platform specific SDK code, but explicitly check Windows anyway
        os: [ubuntu-22.04, windows-2022]

    # Check https://github.com/actions/action-versions/tree/main/config/actions
    # for latest versions if the standard actions start emitting warnings

    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}

    - name: Get pip cache dir
      id: pip-cache
      run: |
        echo "dir=$(python -m pip cache dir)" >> $GITHUB_OUTPUT

    - name: Cache bootstrapping dependencies
      uses: actions/cache@v4
      with:
        path: ${{ steps.pip-cache.outputs.dir }}
        key:
          pip-${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('pdm.lock') }}
        restore-keys: |
          pip-${{ matrix.os }}-${{ matrix.python-version }}-v1-

    - name: Install PDM
      run: |
        # Ensure `pdm` uses the same version as specified in `pdm.lock`
        # while avoiding the error raised by https://github.com/pypa/pip/issues/12889
        python -m pip install --upgrade -r ci-bootstrap-requirements.txt

    - name: Create development virtual environment
      run: |
        python -m pdm sync --no-self --dev
        # Handle Windows vs non-Windows differences in .venv layout
        VIRTUAL_ENV_BIN_DIR="$PWD/.venv/bin"
        test -e "$VIRTUAL_ENV_BIN_DIR" || VIRTUAL_ENV_BIN_DIR="$PWD/.venv/Scripts"
        echo "VIRTUAL_ENV_BIN_DIR=$VIRTUAL_ENV_BIN_DIR" >> "$GITHUB_ENV"

    - name: Static checks
      run: |
        source "$VIRTUAL_ENV_BIN_DIR/activate"
        python -m tox -v -m static

    - name: CI-compatible tests
      run: |
        source "$VIRTUAL_ENV_BIN_DIR/activate"
        python -m tox -v -- -m 'not lmstudio'

    - name: Upload coverage data
      uses: actions/upload-artifact@v4
      with:
        name: coverage-data-${{ matrix.os }}-py${{ matrix.python-version }}
        path: .coverage.*
        include-hidden-files: true
        if-no-files-found: ignore


  # Coverage check based on https://hynek.me/articles/ditch-codecov-python/
  coverage:
    name: Combine & check coverage
    if: always()
    needs: tests
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false

      - uses: actions/setup-python@v5
        with:
          # Use latest Python, so it understands all syntax.
          python-version: "3.13"

      # https://github.com/hynek/setup-cached-uv/releases/tag/v2.3.0
      - uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817

      - uses: actions/download-artifact@v4
        with:
          pattern: coverage-data-*
          merge-multiple: true

      - name: Combine coverage & fail if it goes down
        run: |
          uv tool install 'coverage[toml]'

          coverage combine
          coverage html --skip-covered --skip-empty

          # Report and write to summary.
          coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

          # Report again and fail if under 50%.
          # Highest historical coverage: 65%
          # Last noted local test coverage level: 94%
          # CI coverage percentage is low because many of the tests
          # aren't CI compatible (they need a local LM Studio instance).
          # It's only as high as it is because the generated data model
          # classes make up such a large portion of the total SDK code.
          # Accept anything over 50% until CI is set up to run LM Studio
          # in headless mode, and hence is able to run end-to-end tests.
          coverage report --fail-under=50

      - name: Upload HTML report if check failed
        uses: actions/upload-artifact@v4
        with:
          name: html-report
          path: htmlcov
        if: ${{ failure() }}

</document_content>
</document>

<document index="5">
<source>.gitignore</source>
<document_content>
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# poetry
#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
#   in version control.
#   https://pdm-project.org/#use-with-ide
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.DS_Store

</document_content>
</document>

<document index="6">
<source>.gitmodules</source>
<document_content>
[submodule "sdk-schema/lmstudio-js"]
	path = sdk-schema/lmstudio-js
	url = https://github.com/lmstudio-ai/lmstudio-js.git

</document_content>
</document>

<document index="7">
<source>CONTRIBUTING.md</source>
<document_content>
# Contributing to Our Open Source Projects

First off, thank you for considering contributing to our open source projects! 👾❤️ 

`lmstudio-python` is the Python SDK for LM Studio. It is an open-source project under the MIT license. We welcome community contributions. 

There are many ways to help, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or contributing code which can be incorporated into the SDK itself.

Note: the SDK documentation is maintained in combination with [`lmstudio-js`](https://github.com/lmstudio-ai/lmstudio-js)
in a dedicated [documentation repo](https://github.com/lmstudio-ai/docs).

## Communication

- **The best way to communicate with the team is to open an issue in this repository**
- For bug reports, include steps to reproduce, expected behavior, and actual behavior
- For feature requests, explain the use case and benefits clearly

## Before You Contribute

- **If you find an existing issue you'd like to work on, please comment on it first and tag the team**
- This allows us to provide guidance and ensures your time is well spent
- **We discourage drive-by feature PRs** without prior discussion - we want to make sure your efforts align with our roadmap and won't go to waste

## Development Workflow

`lmstudio-python` makes extensive use of pattern matching and hence requires _Python 3.10 or later_

1. Fork this repository
2. Clone your fork: `git clone git@github.com:lmstudio-ai/lmstudio-python.git` onto your local development machine
3. Install the `tox` environment manager via your preferred mechanism (such as `pipx` or `uvx`)
4. Run `tox -m test` to run the test suite (`pytest` is the test runner, pass options after a `--` separator)
5. Run `tox -m static` to run the linter and typechecker
6. Run `tox -e format` to run the code autoformatter

Refer to [`README.md`](./README.md) and [`testing/README.md`](testing/README.md)for additional details
on working with the `lmstudio-python` code and test suite.

## Creating Good Pull Requests

### Keep PRs Small and Focused

- Address one concern per PR
- Smaller PRs are easier to review and more likely to be merged quickly

### Write Thoughtful PR Descriptions

- Clearly explain what the PR does and why
- When applicable, show before/after states or screenshots
- Include any relevant context for reviewers
- Reference the issue(s) your PR addresses with GitHub keywords (Fixes #123, Resolves #456)

### Quality Expectations

- Follow existing code style and patterns
- Include tests for new functionality
- Ensure all tests pass
- Update documentation as needed

## Code Review Process

- Maintainers will review your PR as soon as possible
- We may request changes or clarification
- Once approved, a maintainer will merge your contribution

## Contributor License Agreement (CLA)

- We require all contributors to sign a Contributor License Agreement (CLA)
- For first-time contributors, a bot will automatically comment on your PR with instructions
- You'll need to accept the CLA before we can merge your contribution
- This is standard practice in open source and helps protect both contributors and the project

## Q&A

- **How does `lmstudio-python` communicate with LM Studio?**

  `lmstudio-python` communicates with LM Studio through its native dedicated websocket API, rather than via its Open AI compatibility layer.

- **How does `lmstudio-python` relate to `lmstudio-js`?**

  `lmstudio-python` communicates with LM Studio based on JSON interface types defined in `lmstudio-js`.
  The `lmstudio-python` repository includes `lmstudio-js` as a submodule in order to support generating
  the Python API interface classes from the JSON schema definitions exported by `lmstudio-js`.

## Questions

If you have any other questions, feel free to join the [LM Studio Discord server](https://discord.gg/pwQWNhmQTY) and ask in the `#dev-chat` channel.

## Is the LM Studio team hiring?

Yes, yes we are. Please see our careers page: https://lmstudio.ai/careers.

Thank you for your contributions!

</document_content>
</document>

<document index="8">
<source>LICENSE</source>
<document_content>
MIT License

Copyright (c) 2025 LM Studio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

</document_content>
</document>

<document index="9">
<source>README.md</source>
<document_content>
# LM Studio Python SDK

## Using the SDK

### Installation

The SDK can be installed from PyPI as follows:

```console
$ pip install lmstudio
```

Installation from the repository URL or a local clone is also
supported for development and pre-release testing purposes.

## Examples

The base component of the LM Studio SDK is the (synchronous) `Client`.
This should be created once and used to manage the underlying
websocket connections to the LM Studio instance.

However, a top level convenience API is provided for convenience in
interactive use (this API implicitly creates a default `Client` instance
which will remain active until the Python interpreter is terminated).

Using this convenience API, requesting text completion from an already
loaded LLM is as straightforward as:

```python
import lmstudio as lms

model = lms.llm()
model.complete("Once upon a time,")
```

Requesting a chat response instead only requires the extra step of
setting up a `Chat` helper to manage the chat history and include
it in response prediction requests:

```python
import lmstudio as lms

EXAMPLE_MESSAGES = (
    "My hovercraft is full of eels!",
    "I will not buy this record, it is scratched."
)

model = lms.llm()
chat = lms.Chat("You are a helpful shopkeeper assisting a foreign traveller")
for message in EXAMPLE_MESSAGES:
    chat.add_user_message(message)
    print(f"Customer: {message}")
    response = model.respond(chat)
    chat.add_assistant_response(response)
    print(f"Shopkeeper: {response}")
```

Additional SDK examples and usage recommendations may be found in the main
[LM Studio Python SDK documentation](https://lmstudio.ai/docs/python).

## SDK versioning

The LM Studio Python SDK uses a 3-part `X.Y.Z` numeric version identifier:

* `X`: incremented when the minimum version of significant dependencies is updated
  (for example, dropping support for older versions of Python or LM Studio).
  Previously deprecated features may be dropped when this part of the version number
  increases.
* `Y`: incremented when new features are added, or some other notable change is
  introduced (such as support for additional versions of Python). New deprecation
  warnings may be introduced when this part of the version number increases.
* `Z`: incremented for bug fix releases which don't contain any other changes.
  Adding exceptions and warnings for previously undetected situations is considered
  a bug fix.

This versioning policy is intentionally similar to [semantic versioning](https://semver.org/),
but differs in the specifics of when the different parts of the version number will be updated.

Release candidates *may* be published prior to full releases, but this will typically only
occur when seeking broader feedback on particular features prior to finalizing the release.

Outside the preparation of a new release, the SDK repository will include a `.devN` suffix
on the nominal Python package version.

## Contributing to SDK development

### Fetching the source code

```console
$ git clone https://github.com/lmstudio-ai/lmstudio-python
$ cd lmstudio-python
```

To be able to run `tox -e sync-sdk-schema`, it is also
necessary to ensure the `lmstudio-js` submodule is updated:

```console
$ git submodule update --init --recursive
```

### Development Environment

In order to work on the Python SDK, you need to install
:pypi:`pdm`, :pypi:`tox`, and :pypi:`tox-pdm`
(everything else can be executed via `tox` environments).

Given these tools, the default development environment can be set up
and other commands executed as described below.

The simplest option for handling that is to install `uv`, and then use
its `uv tool` command to set up `pdm` and a second environment
with `tox` + `tox-pdm`. `pipx` is another reasonable option for this task.

In order to _use_ the Python SDK, you just need some form of
Python environment manager (since `lmstudio-python` publishes
the package `lmstudio` to PyPI).

### Recommended local checks

The set of checks recommended for local execution are accessible via
the `check` marker in `tox`:

```console
$ tox -m check
```

This runs the same checks as the `static` and `test` markers (described below).

### Code consistency checks

The project source code is autoformatted and linted using :pypi:`ruff`.
It also uses :pypi:`mypy` in strict mode to statically check that Python APIs
are being accessed as expected.

All of these commands can be invoked via tox:

```console
$ tox -e format
```

```console
$ tox -e lint
```

```console
$ tox -e typecheck
```

Linting and type checking can be executed together using the `static` marker:

```console
$ tox -m static
```

Avoid using `# noqa` comments to suppress these warnings - wherever
possible, warnings should be fixed instead. `# noqa` comments are
reserved for rare cases where the recommended style causes severe
readability problems, and there isn't a more explicit mechanism
(such as `typing.cast`) to indicate which check is being skipped.

`# fmt: off/on` and `# fmt: skip` comments may be used as needed
when the autoformatter makes readability worse instead of better
(for example, collapsing lists to a single line when they intentionally
cover multiple lines, or breaking alignment of end-of-line comments).

### Automated testing

The project's tests are written using the :pypi:`pytest` test framework.
:pypi:`tox` is used to automate the setup and execution of these tests
across multiple Python versions. One of these is nominated as the
default test target, and is accessible via the `test` marker:

```console
$ tox -m test
```

You can also use other defined versions by specifying the target
environment directly:

```console
$ tox -e py3.11
```

There are additional labels defined for running the oldest test environment,
the latest test environment, and all test environments:

```console
$ tox -m test_oldest
$ tox -m test_latest
$ tox -m test_all
```

To ensure all the required models are loaded before running the tests, run the
following command:

```
$ tox -e load-test-models
```

`tox` has been configured to forward any additional arguments it is given to
`pytest`. This enables the use of pytest's
[rich CLI](https://docs.pytest.org/en/stable/how-to/usage.html#specifying-which-tests-to-run).
In particular, you can select tests using all the options that pytest provides:

```console
$ # Using file name
$ tox -m test -- tests/test_basics.py
$ # Using markers
$ tox -m test -- -m "slow"
$ # Using keyword text search
$ tox -m test -- -k "catalog"
```

Additional notes on running and updating the tests can be found in the
`tests/README.md` file.


### Expanding the API

- the content of `src/lmstudio/_sdk_models` is automatically generated by the
  `sync-sdk-schema.py` script in `sdk-schema` and should not be modified directly.
  Run `tox -e sync-sdk-schema` to regenerate the Python submodule from the existing
  export of the `lmstudio-js` schema (for example, after modifying the data model
  template). Run `tox -e sync-sdk-schema -- --regen-schema` after updating the
  `sdk-schema/lmstudio-js` submodule itself to a newer iteration of the
  `lmstudio-js` JSON API.
- as support for new API namespaces is added to the SDK, each should get a dedicated
  session type (similar to those for the already supported namespaces), even if it
  is only used privately by the client implementation.
- as support for new API channel endppoints is added to the SDK, each should get a
  dedicated base endpoint type (similar to those for the already supported channels).
  This avoids duplicating the receive message processing between the sync and async APIs.
- the `json_api.SessionData` base class is useful for defining rich result objects which
  offer additional methods that call back into the SDK (for example, this is how downloaded
  model listings offer their interfaces to load a new instance of a model).

</document_content>
</document>

# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/examples/chatbot.py
# Language: python

import readline
import lmstudio as lms


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/examples/speculative-decoding.py
# Language: python

import lmstudio as lms


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/examples/structured-response.py
# Language: python

import json
import lmstudio as lms

class BookSchema(l, m, s, ., B, a, s, e, M, o, d, e, l):
    """Structured information about a published book."""


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/examples/terminal-sim.py
# Language: python

import readline
import lmstudio as lms


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/examples/tool-use-multiple.py
# Language: python

import math
import lmstudio as lms

def add((a: int, b: int)) -> int:
    """Given two numbers a and b, returns the sum of them."""

def is_prime((n: int)) -> bool:
    """Given a number n, returns True if n is a prime number."""


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/examples/tool-use.py
# Language: python

import lmstudio as lms

def multiply((a: float, b: float)) -> float:
    """Given two numbers a and b. Returns the product of them."""


<document index="10">
<source>lock_dev_venv.sh</source>
<document_content>
#!/bin/bash
if [ "$1" != "--skip-lock" ]; then
    pdm lock --dev          --platform=manylinux_2_17_x86_64
    pdm lock --dev --append --platform=musllinux_1_1_x86_64
    pdm lock --dev --append --platform=windows_amd64
    pdm lock --dev --append --platform=windows_arm64
    pdm lock --dev --append --platform=macos_x86_64
    pdm lock --dev --append --platform=macos_arm64
fi
# Allow bootstrapping `pdm` in CI environments
# with the command `pip install --upgrade -r ci-bootstrap-requirements.txt`
ci_bootstrap_file="ci-bootstrap-requirements.txt"
pdm export --dev --no-default --group bootstrap -o "$ci_bootstrap_file"
echo "Exported $ci_bootstrap_file"
# Also support passing the CI version pins as constraints to any `pip install` command
ci_constraints_file="ci-constraints.txt"
pdm export --dev --no-extras -o "$ci_constraints_file"
echo "Exported $ci_constraints_file"

</document_content>
</document>

# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/misc/open_client.py
# Language: python

import asyncio
import logging
import sys
import time
from lmstudio import AsyncClient, Client

def open_client_async(()):
    """Start async client, wait for link failure."""

def open_client_sync(()):
    """Start sync client, wait for link failure."""


<document index="11">
<source>misc/tag-release.sh</source>
<document_content>
#!/bin/sh
version_tag="$(pdm show --version)"
git tag -a "$version_tag" -m "$version_tag"

</document_content>
</document>

<document index="12">
<source>misc/update-sdk-schema.sh</source>
<document_content>
#!/bin/bash

# See http://redsymbol.net/articles/unofficial-bash-strict-mode/ for benefit of these options
set -euo pipefail
IFS=$'\n\t'

# Note: `readlink -f` (long available in GNU coreutils) is available on macOS 12.3 and later
script_dir="$(cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")" &> /dev/null && pwd)"

# Update submodule to tip of the lmstudio-js main branch and regenerate the exported schema
# (to incorporate Python data model template changes, just run `tox -e sync-sdk-schema`)

pushd "$script_dir/../sdk-schema/lmstudio-js" || exit 1
git switch main
git pull
git submodule update --init --recursive
popd || exit 1
tox -e sync-sdk-schema -- --regen-schema

</document_content>
</document>

<document index="13">
<source>pyproject.toml</source>
<document_content>
[project]
name = "lmstudio"
version = "1.4.2.dev0"
description = "LM Studio Python SDK"
authors = [
    {name = "LM Studio", email = "team@lmstudio.ai"},
]
maintainers = [
    {name = "Alyssa Coghlan", email = "ncoghlan@gmail.com"},
    {name = "Christian Zhou-Zheng", email = "christianzhouzheng@gmail.com"},
]

# Note: unless explicitly noted, the actual minimum dependencies may be
#       lower than recorded (PDM sets the minimum to the latest version
#       available when each dependency is first added to the project).

dependencies = [
    "httpx>=0.27.2",
    "httpx-ws>=0.7.0",
    "msgspec>=0.18.6",
    # Minimum msgspec version for 3.13 compatibility
    "msgspec>=0.19.0 ; python_version >= '3.13'",
    "typing-extensions>=4.12.2",
    # Task group handling for versions prior to Python 3.11
    "anyio>=4.8.0",
]

# Keep this in sync with the target Python version in sync-sdk-schema.py
requires-python = ">=3.10"

readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Typing :: Typed",
]

[project.urls]
# Note: actual URLs are still to be determined
#       In particular, the docs url assumes common SDK docs
#       with inline parallel examples for each language,
#       which may not be how this ends up working.
Homepage = "https://github.com/lmstudio-ai/lmstudio-sdk-python"
Documentation = "https://lmstudio.ai/docs/sdk/"
Issues = "https://github.com/lmstudio-ai/lmstudio-sdk-python/issues"

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.pdm]
distribution = true


[tool.pdm.dev-dependencies]
dev = [
    "tox>=4.16.0",
    "tox-gh>=1.3.2",
    "tox-pdm>=0.7.2",
    "pytest>=8.3.1",
    "pytest-asyncio>=0.24.0",
    "pytest-subtests>=0.13.1",
    "ruff>=0.5.4",
    "mypy>=1.11.0",
    "coverage[toml]>=7.6.4",
]
bootstrap = [
    "pdm>=2.16.1",
]
sync-sdk-schema = [
    # Needs https://github.com/koxudaxi/datamodel-code-generator/issues/2211 fix
    "datamodel-code-generator[http]>=0.26.4",
]
docs = [
    # Add markers to avoid trying to lock this group for Python 3.10
    # Docs environment will always be Python 3.11 or later
    "sphinx>=8.1.3; python_version >= '3.11'",
    "sphinx-inline-tabs>=2023.4.21; python_version >= '3.11'",
    "furo>=2024.8.6; python_version >= '3.11'",
]

[tool.pytest.ini_options]
# Allow skipping tests that require a local LM Studio instance
addopts = "--strict-markers"
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
    "lmstudio: marks tests as needing LM Studio (deselect with '-m \"not lmstudio\"')",
    "wip: marks tests as a work-in-progress (select with '-m \"wip\"')"
]
# Warnings should only be emitted when being specifically tested
filterwarnings = [
    "error",
    "ignore:.*the async API is not yet stable:FutureWarning"
]
# Capture log info from network client libraries
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
# Each async test case gets a fresh event loop by default
asyncio_default_fixture_loop_scope = "function"

[tool.coverage.run]
relative_files = true
source_pkgs = [
    "lmstudio",
]
source = [
    "tests/",
]

[tool.coverage.paths]
source = [
    "src/",
    "**/.tox/**/site-packages/",
]

[tool.ruff]
# Assume Python 3.10+
target-version = "py310"

[tool.ruff.lint]
# Enable all `pydocstyle` rules, limiting to those that adhere to the
# Google convention via `convention = "google"`, below.
extend-select = ["D"]

# Disable `D105` (it's OK to skip writing docstrings for every magic method)
ignore = ["D105", "D417"]

[tool.ruff.lint.pydocstyle]
# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html#example-google
convention = "google"

[tool.ruff.lint.per-file-ignores]
# Skip checking docstrings in the test suite
"tests/**" = ["D"]

</document_content>
</document>

<document index="14">
<source>sdk-schema/.gitignore</source>
<document_content>
node_modules
*.tsbuildinfo

</document_content>
</document>

<document index="15">
<source>sdk-schema/README.md</source>
<document_content>
lmstudio-js JSON Schema export
==============================

`tox -e sync-sdk-schema` runs `sync-sdk-schema.py` in
a suitably configured Python environment.

The generated models are written to `../src/lmstudio/_sdk_models/*.py`.

</document_content>
</document>

<document index="16">
<source>sdk-schema/_templates/msgspec.jinja2</source>
<document_content>
{% if fields %}
###############################################################################
# {{ class_name }}
###############################################################################
{% set struct_name = class_name %}
{% set struct_kwargs = (base_class_kwargs|default({})) %}
{% set tag_field_name = struct_kwargs.get("tag_field", "").strip("'") %}
{% set dict_name = class_name + "Dict" %}

{% for decorator in decorators %}
{{ decorator }}
{% endfor %}
class {{ struct_name }}({{ base_class }}["{{ dict_name }}"]{%- for key, value in struct_kwargs.items() -%}
, {{ key }}={{ value }}
{%- endfor -%}):
{%- if description %}
    """{{ description | indent(4) }}"""
{%- endif %}
{% for field in fields -%}
    {%- if field.name == tag_field_name %}
    {%- if field.annotated %}
    {{ field.name }}: {{ field.annotated }} = {{ struct_kwargs["tag"] }}
    {%- else %}
    {{ field.name }}: {{ field.type_hint }} = {{ struct_kwargs["tag"] }}
    {%- endif %}
    {%- else %}
    {%- if not field.annotated and field.field %}
    {{ field.name }}: {{ field.type_hint }} = {{ field.field }}
    {%- else %}
    {%- if field.annotated and not field.field %}
    {{ field.name }}: {{ field.annotated }}
    {%- elif field.annotated and field.field %}
    {{ field.name }}: {{ field.annotated }} = {{ field.field }}
    {%- else %}
    {{ field.name }}: {{ field.type_hint }}
    {%- endif %}
    {%- if not field.field and (not field.required or field.data_type.is_optional or field.nullable)
            %} = {{ field.represented_default }}
    {%- endif -%}
    {%- endif %}
    {%- endif -%}
    {%- if field.docstring %}
    """{{ field.docstring | indent(4) }}"""
    {%- endif %}
{%- endfor %}

class {{ dict_name }}(TypedDict):
    """Corresponding typed dictionary definition for {{ struct_name }}.

    NOTE: Multi-word keys are defined using their camelCase form,
    as that is what `to_dict()` emits, and what `_from_api_dict()` accepts.
    """
{% for field in fields -%}
    {%- set field_name = field.original_name or field.name -%}
    {%- if field.name == tag_field_name %}
    {{ field_name }}: Literal[{{ struct_kwargs["tag"] }}]
    {%- else %}
    {%- set field_hint = field.annotated or field.type_hint -%}
    {%- if field_hint.endswith("| None") %}
    {{ field_name }}: NotRequired[{{ field_hint }}]
    {%- else %}
    {{ field_name }}: {{ field_hint }}
    {%- endif %}
    {%- endif -%}
    {%- if field.docstring %}
    """{{ field.docstring | indent(4) }}"""
    {%- endif %}
{%- endfor %}
{% else %}
class {{ class_name }}():
{%- if description %}
    """{{ description | indent(4) }}"""
{% else %}
    pass
{% endif %}
{% endif %}

</document_content>
</document>

<document index="17">
<source>sdk-schema/lms-with-inferred-unions.json</source>
<document_content>
{
  "type": "object",
  "properties": {
    "diagnostics": {
      "$ref": "#/definitions/pseudo/diagnostics"
... (file content truncated to first 5 lines)
</document_content>
</document>

<document index="18">
<source>sdk-schema/lms.json</source>
<document_content>
{
  "type": "object",
  "properties": {
    "diagnostics": {
      "$ref": "#/definitions/pseudo/diagnostics"
... (file content truncated to first 5 lines)
</document_content>
</document>

# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/sdk-schema/sync-sdk-schema.py
# Language: python

import ast
import builtins
import json
import re
import shutil
import subprocess
import sys
import tokenize
from collections import defaultdict
from contextlib import chdir
from pathlib import Path
from typing import Any
from datamodel_code_generator import (
    DataModelType,
    InputFileType,
    generate,
    LiteralType,
    PythonVersion,
)

class _SchemaProcessor:
    """Process schema to identify discriminated union fields."""
    def __init__((self, schema_path: Path)) -> None:
    def infer_unions((self)) -> _SchemaObject:
    def _process_schema((self)) -> None:
    def _process_named_spec((self, name: str, spec: _SchemaObject)) -> _SchemaDef | None:
    def _extract_union_variants((
        self, name: str, spec: _SchemaObject
    )) -> _SchemaDef | None:
    def _process_rpc_result_union((
        self, name: str, spec: _SchemaObject
    )) -> _SchemaObject | None:
    def _process_subschema((self, name: str, spec: _SchemaObject)) -> _SchemaDef | None:

def _export_zod_schemas_to_json_schema(()) -> None:
    """Run the lmstudio-js JSON schema export in the submodule."""

def _cache_json_schema(()) -> None:
    """Cache the built JSON schema file outside the submodule."""

def _resolve_json_ref((json_schema: _SchemaObject, ref: str)) -> _SchemaObject:

def _check_discriminator((tag_field: str, union_array: _SchemaList)) -> bool:

def _make_spec_name((parent_name: str, suffix: str)) -> str:

def _merge_defs((existing_defs: _SchemaDef, new_defs: _SchemaDef | None)) -> None:

def __init__((self, schema_path: Path)) -> None:

def infer_unions((self)) -> _SchemaObject:

def _process_schema((self)) -> None:

def _process_named_spec((self, name: str, spec: _SchemaObject)) -> _SchemaDef | None:

def _extract_union_variants((
        self, name: str, spec: _SchemaObject
    )) -> _SchemaDef | None:

def _is_void_union((union_members: _SchemaList)) -> _SchemaObject | None:

def _process_rpc_result_union((
        self, name: str, spec: _SchemaObject
    )) -> _SchemaObject | None:

def _process_subschema((self, name: str, spec: _SchemaObject)) -> _SchemaDef | None:

def _infer_schema_unions(()) -> None:

def _generate_data_model_from_json_schema(()) -> None:
    """Produce Python data model classes from the exported JSON schema file."""

def _main(()) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/__init__.py
# Language: python

from .sdk_api import *
from .schemas import *
from .history import *
from .json_api import *
from .async_api import *
from .sync_api import *


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/_kv_config.py
# Language: python

from dataclasses import dataclass
from typing import (
    TYPE_CHECKING,
    Any,
    Callable,
    Container,
    Iterable,
    Sequence,
    Type,
    TypeAlias,
    TypeVar,
    cast,
    get_args,
)
from typing_extensions import (
    # Native in 3.11+
    assert_never,
)
from .sdk_api import LMStudioValueError
from .schemas import DictObject, DictSchema, ModelSchema, MutableDictObject
from ._sdk_models import (
    EmbeddingLoadModelConfig,
    EmbeddingLoadModelConfigDict,
    GpuSettingDict,
    GpuSplitConfig,
    GpuSplitConfigDict,
    KvConfig,
    KvConfigFieldDict,
    KvConfigStack,
    KvConfigStackLayerDict,
    LlmLoadModelConfig,
    LlmLoadModelConfigDict,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmSplitStrategy,
    LlmStructuredPredictionSetting,
    LlmStructuredPredictionSettingDict,
)

class ConfigField:
    def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:
    def update_client_config((
        self, client_config: MutableDictObject, value: Any
    )) -> None:

class CheckboxField(C, o, n, f, i, g, F, i, e, l, d):
    def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:
    def update_client_config((
        self, client_config: MutableDictObject, value: DictObject
    )) -> None:

class NestedKeyField(C, o, n, f, i, g, F, i, e, l, d):
    def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:
    def update_client_config((
        self, client_config: MutableDictObject, value: Any
    )) -> None:

class MultiPartField(C, o, n, f, i, g, F, i, e, l, d):
    def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:
    def update_client_config((
        self, client_config: MutableDictObject, server_value: DictObject
    )) -> None:

def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:

def update_client_config((
        self, client_config: MutableDictObject, value: Any
    )) -> None:

def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:

def update_client_config((
        self, client_config: MutableDictObject, value: DictObject
    )) -> None:

def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:

def update_client_config((
        self, client_config: MutableDictObject, value: Any
    )) -> None:

def to_kv_field((
        self, server_key: str, client_config: DictObject
    )) -> KvConfigFieldDict | None:

def update_client_config((
        self, client_config: MutableDictObject, server_value: DictObject
    )) -> None:

def _gpu_settings_to_gpu_split_config((
    main_gpu: int | None,
    llm_split_strategy: LlmSplitStrategy | None,
    disabledGpus: Sequence[int] | None,
)) -> GpuSplitConfigDict:

def _gpu_split_config_to_gpu_settings((
    server_dict: DictObject, client_dict: MutableDictObject
)) -> None:

def _iter_server_keys((
    *namespaces: str, excluded: Container[str] = ()
)) -> Iterable[tuple[str, ConfigField]]:

def _invert_config_keymap((from_server: FromServerKeymap)) -> ToServerKeymap:

def dict_from_kvconfig((config: KvConfig)) -> DictObject:

def parse_server_config((server_config: DictObject)) -> DictObject:
    """Map server config fields to client config fields."""

def parse_llm_load_config((server_config: DictObject)) -> LlmLoadModelConfig:

def parse_prediction_config((server_config: DictObject)) -> LlmPredictionConfig:

def _api_override_kv_config_stack((
    fields: list[KvConfigFieldDict],
    additional_layers: Sequence[KvConfigStackLayerDict] = (),
)) -> KvConfigStack:

def _to_kv_config_stack_base((
    config: DictObject, keymap: ToServerKeymap
)) -> list[KvConfigFieldDict]:

def _client_config_to_kv_config_stack((
    config: DictObject, keymap: ToServerKeymap
)) -> KvConfigStack:

def load_config_to_kv_config_stack((
    config: TLoadConfig | DictObject | None, config_type: Type[TLoadConfig]
)) -> KvConfigStack:
    """Helper to convert load configs to KvConfigStack instances with strict typing."""

def prediction_config_to_kv_config_stack((
    response_format: Type[ModelSchema] | ResponseSchema | None,
    config: LlmPredictionConfig | LlmPredictionConfigDict | None,
    for_text_completion: bool = False,
)) -> tuple[bool, KvConfigStack]:

def _get_completion_config_layer(()) -> KvConfigStackLayerDict:
    """Config layer to request text completion instead of a chat response."""


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/_logging.py
# Language: python

import json
import logging
from typing import Any

class StructuredLogEvent:
    def __init__((self, event: str, event_dict: LogEventContext)) -> None:
    def as_formatted_json((self)) -> str:
    def __str__((self)) -> str:

class StructuredLogger:
    def __init__((self, logger: logging.Logger)) -> None:
    def update_context((
        self, log_context: LogEventContext | None = None, /, **additional_context: Any
    )) -> None:
    def _log((
        self,
        level: int,
        msg: str,
        exc_info: bool,
        stack_info: bool,
        stacklevel: int,
        event_dict: LogEventContext,
    )) -> None:
    def log((
        self,
        level: int,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:
    def debug((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:
    def info((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:
    def warn((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:
    def error((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:
    def exception((self, msg: str, *, stacklevel: int = 1, **event_dict: Any)) -> None:
    def critical((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def __init__((self, event: str, event_dict: LogEventContext)) -> None:

def as_formatted_json((self)) -> str:

def __str__((self)) -> str:

def __init__((self, logger: logging.Logger)) -> None:

def update_context((
        self, log_context: LogEventContext | None = None, /, **additional_context: Any
    )) -> None:

def _log((
        self,
        level: int,
        msg: str,
        exc_info: bool,
        stack_info: bool,
        stacklevel: int,
        event_dict: LogEventContext,
    )) -> None:

def log((
        self,
        level: int,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def debug((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def info((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def warn((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def error((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def exception((self, msg: str, *, stacklevel: int = 1, **event_dict: Any)) -> None:

def critical((
        self,
        msg: str,
        *,
        exc_info: bool = False,
        stack_info: bool = False,
        stacklevel: int = 1,
        **event_dict: Any,
    )) -> None:

def new_logger((name: str, /, *args: Any, **kwds: Any)) -> StructuredLogger:


<document index="19">
<source>src/lmstudio/_sdk_models/README.md</source>
<document_content>
lmstudio-js SDK Data Model
==========================

The Python data model class definitions in this folder are generated from
the lmstudio-js zod schema files rather than being maintained directly.

These files should NOT be modified: if the messaging protocol details
change, updates should be made in lmstudio-js first, and then exported
to the Python SDK via the automated code generation.

See the `sdk-schema` exporter folder for additional details.

</document_content>
</document>

# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/_sdk_models/__init__.py
# Language: python

from typing import Annotated, Any, ClassVar, Literal, Mapping, Sequence, TypedDict
from msgspec import Meta, field
from typing_extensions import NotRequired
from ..schemas import LMStudioStruct

class BackendNotification(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", B, a, c, k, e, n, d, N, o, t, i, f, i, c, a, t, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class BackendNotificationDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for BackendNotification."""

class TextData(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, e, x, t, D, a, t, a, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", t, e, x, t, ", 
):

class TextDataDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessagePartTextData."""

class ToolCallResultData(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, C, a, l, l, R, e, s, u, l, t, D, a, t, a, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, R, e, s, u, l, t, ", ,, 
):

class ToolCallResultDataDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessagePartToolCallResultData."""

class ToolCallResult(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, C, a, l, l, R, e, s, u, l, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ToolCallResultDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolCallResult."""

class CitationSource(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", C, i, t, a, t, i, o, n, S, o, u, r, c, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class CitationSourceDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for CitationSource."""

class EmbeddingModelAdditionalInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, M, o, d, e, l, A, d, d, i, t, i, o, n, a, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingModelAdditionalInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingModelAdditionalInfo."""

class EmbeddingModelInstanceAdditionalInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, M, o, d, e, l, I, n, s, t, a, n, c, e, A, d, d, i, t, i, o, n, a, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingModelInstanceAdditionalInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingModelInstanceAdditionalInfo."""

class SerializedLMSExtendedError(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, e, r, i, a, l, i, z, e, d, L, M, S, E, x, t, e, n, d, e, d, E, r, r, o, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class SerializedLMSExtendedErrorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for SerializedLMSExtendedError."""

class DocumentParsingLibraryIdentifier(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, o, c, u, m, e, n, t, P, a, r, s, i, n, g, L, i, b, r, a, r, y, I, d, e, n, t, i, f, i, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class DocumentParsingLibraryIdentifierDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DocumentParsingLibraryIdentifier."""

class DocumentParsingOpts(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, o, c, u, m, e, n, t, P, a, r, s, i, n, g, O, p, t, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class DocumentParsingOptsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DocumentParsingOpts."""

class KvConfigField(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, F, i, e, l, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class KvConfigFieldDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigField."""

class KvConfig(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class KvConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfig."""

class KvConfigStackLayer(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, S, t, a, c, k, L, a, y, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class KvConfigStackLayerDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigStackLayer."""

class KvConfigStack(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, S, t, a, c, k, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class KvConfigStackDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigStack."""

class LlmMlxKvCacheQuantization(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, M, l, x, K, v, C, a, c, h, e, Q, u, a, n, t, i, z, a, t, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmMlxKvCacheQuantizationDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmMlxKvCacheQuantization."""

class LlmAdditionalInfo(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, A, d, d, i, t, i, o, n, a, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmAdditionalInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmAdditionalInfo."""

class LlmInstanceAdditionalInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, I, n, s, t, a, n, c, e, A, d, d, i, t, i, o, n, a, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmInstanceAdditionalInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmInstanceAdditionalInfo."""

class LlmLlamaMirostatSamplingConfig(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, L, l, a, m, a, M, i, r, o, s, t, a, t, S, a, m, p, l, i, n, g, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmLlamaMirostatSamplingConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmLlamaMirostatSamplingConfig."""

class LlmReasoningParsing(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, e, a, s, o, n, i, n, g, P, a, r, s, i, n, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmReasoningParsingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmReasoningParsing."""

class LlmPredictionFragment(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, P, r, e, d, i, c, t, i, o, n, F, r, a, g, m, e, n, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmPredictionFragmentDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmPredictionFragment."""

class LlmJinjaPromptTemplate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, J, i, n, j, a, P, r, o, m, p, t, T, e, m, p, l, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmJinjaPromptTemplateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmJinjaPromptTemplate."""

class LlmManualPromptTemplate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, M, a, n, u, a, l, P, r, o, m, p, t, T, e, m, p, l, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmManualPromptTemplateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmManualPromptTemplate."""

class ProcessingRequestConfirmToolCall(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, R, e, q, u, e, s, t, C, o, n, f, i, r, m, T, o, o, l, C, a, l, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, f, i, r, m, T, o, o, l, C, a, l, l, ", ,, 
):

class ProcessingRequestConfirmToolCallDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingRequestConfirmToolCall."""

class ProcessingRequestResponseTextInput(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, R, e, q, u, e, s, t, R, e, s, p, o, n, s, e, T, e, x, t, I, n, p, u, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, e, x, t, I, n, p, u, t, ", ,, 
):

class ProcessingRequestResponseTextInputDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingRequestResponseTextInput."""

class ProcessingRequestTextInput(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, R, e, q, u, e, s, t, T, e, x, t, I, n, p, u, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, e, x, t, I, n, p, u, t, ", ,, 
):

class ProcessingRequestTextInputDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingRequestTextInput."""

class ProcessingUpdateCitationBlockCreate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, i, t, a, t, i, o, n, B, l, o, c, k, C, r, e, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, i, t, a, t, i, o, n, B, l, o, c, k, ., c, r, e, a, t, e, ", ,, 
):

class ProcessingUpdateCitationBlockCreateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateCitationBlockCreate."""

class ProcessingUpdateContentBlockAppendText(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, A, p, p, e, n, d, T, e, x, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., a, p, p, e, n, d, T, e, x, t, ", ,, 
):

class ProcessingUpdateContentBlockAppendTextDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockAppendText."""

class ProcessingUpdateContentBlockAppendToolRequest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, A, p, p, e, n, d, T, o, o, l, R, e, q, u, e, s, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., a, p, p, e, n, d, T, o, o, l, R, e, q, u, e, s, t, ", ,, 
):

class ProcessingUpdateContentBlockAppendToolRequestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockAppendToolRequest."""

class ProcessingUpdateContentBlockAppendToolResult(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, A, p, p, e, n, d, T, o, o, l, R, e, s, u, l, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., a, p, p, e, n, d, T, o, o, l, R, e, s, u, l, t, ", ,, 
):

class ProcessingUpdateContentBlockAppendToolResultDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockAppendToolResult."""

class ProcessingUpdateContentBlockReplaceText(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, R, e, p, l, a, c, e, T, e, x, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., r, e, p, l, a, c, e, T, e, x, t, ", ,, 
):

class ProcessingUpdateContentBlockReplaceTextDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockReplaceText."""

class ProcessingUpdateContentBlockReplaceToolRequest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, R, e, p, l, a, c, e, T, o, o, l, R, e, q, u, e, s, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., r, e, p, l, a, c, e, T, o, o, l, R, e, q, u, e, s, t, ", ,, 
):

class ProcessingUpdateContentBlockReplaceToolRequestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockReplaceToolRequest."""

class ProcessingUpdateContentBlockSetPrefix(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, S, e, t, P, r, e, f, i, x, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., s, e, t, P, r, e, f, i, x, ", ,, 
):

class ProcessingUpdateContentBlockSetPrefixDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockSetPrefix."""

class ProcessingUpdateContentBlockSetSuffix(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, S, e, t, S, u, f, f, i, x, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., s, e, t, S, u, f, f, i, x, ", ,, 
):

class ProcessingUpdateContentBlockSetSuffixDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockSetSuffix."""

class ProcessingUpdateDebugInfoBlockCreate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, D, e, b, u, g, I, n, f, o, B, l, o, c, k, C, r, e, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, e, b, u, g, I, n, f, o, B, l, o, c, k, ., c, r, e, a, t, e, ", ,, 
):

class ProcessingUpdateDebugInfoBlockCreateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateDebugInfoBlockCreate."""

class ProcessingUpdateSetSenderName(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, S, e, t, S, e, n, d, e, r, N, a, m, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, e, t, S, e, n, d, e, r, N, a, m, e, ", ,, 
):

class ProcessingUpdateSetSenderNameDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateSetSenderName."""

class ProcessingUpdateStatusRemove(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, S, t, a, t, u, s, R, e, m, o, v, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, t, u, s, ., r, e, m, o, v, e, ", ,, 
):

class ProcessingUpdateStatusRemoveDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateStatusRemove."""

class ProcessingUpdateToolStatusArgumentFragment(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, T, o, o, l, S, t, a, t, u, s, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, S, t, a, t, u, s, ., a, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, ", ,, 
):

class ProcessingUpdateToolStatusArgumentFragmentDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateToolStatusArgumentFragment."""

class GetModelOpts(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", G, e, t, M, o, d, e, l, O, p, t, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class GetModelOptsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for GetModelOpts."""

class ArtifactDownloadPlanModelInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, M, o, d, e, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class ArtifactDownloadPlanModelInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactDownloadPlanModelInfo."""

class LocalArtifactFileEntry(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, o, c, a, l, A, r, t, i, f, a, c, t, F, i, l, e, E, n, t, r, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LocalArtifactFileEntryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LocalArtifactFileEntry."""

class LocalArtifactFileList(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, o, c, a, l, A, r, t, i, f, a, c, t, F, i, l, e, L, i, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LocalArtifactFileListDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LocalArtifactFileList."""

class DownloadProgressUpdate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, U, p, d, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class DownloadProgressUpdateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DownloadProgressUpdate."""

class ModelSearchOpts(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, e, a, r, c, h, O, p, t, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ModelSearchOptsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSearchOpts."""

class ModelSearchResultDownloadOptionData(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, e, a, r, c, h, R, e, s, u, l, t, D, o, w, n, l, o, a, d, O, p, t, i, o, n, D, a, t, a, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class ModelSearchResultDownloadOptionDataDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSearchResultDownloadOptionData."""

class InternalRetrievalResultEntry(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", I, n, t, e, r, n, a, l, R, e, t, r, i, e, v, a, l, R, e, s, u, l, t, E, n, t, r, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class InternalRetrievalResultEntryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for InternalRetrievalResultEntry."""

class InternalRetrievalResult(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", I, n, t, e, r, n, a, l, R, e, t, r, i, e, v, a, l, R, e, s, u, l, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class InternalRetrievalResultDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for InternalRetrievalResult."""

class RetrievalChunk(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, t, r, i, e, v, a, l, C, h, u, n, k, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class RetrievalChunkDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RetrievalChunk."""

class KvConfigSchematicsDeserializationError(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, D, e, s, e, r, i, a, l, i, z, a, t, i, o, n, E, r, r, o, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class KvConfigSchematicsDeserializationErrorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigSchematicsDeserializationError."""

class SerializedKVConfigSchematicsField(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, e, r, i, a, l, i, z, e, d, K, V, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, F, i, e, l, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class SerializedKVConfigSchematicsFieldDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for SerializedKVConfigSchematicsField."""

class SerializedKVConfigSchematics(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, e, r, i, a, l, i, z, e, d, K, V, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class SerializedKVConfigSchematicsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for SerializedKVConfigSchematics."""

class VirtualModelConditionEquals(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, C, o, n, d, i, t, i, o, n, E, q, u, a, l, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class VirtualModelConditionEqualsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelConditionEquals."""

class VirtualModelCustomFieldAppendSystemPromptEffect(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, C, u, s, t, o, m, F, i, e, l, d, A, p, p, e, n, d, S, y, s, t, e, m, P, r, o, m, p, t, E, f, f, e, c, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, p, p, e, n, d, S, y, s, t, e, m, P, r, o, m, p, t, ", ,, 
):

class VirtualModelCustomFieldAppendSystemPromptEffectDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelCustomFieldAppendSystemPromptEffect."""

class VirtualModelCustomFieldPrependSystemPromptEffect(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, C, u, s, t, o, m, F, i, e, l, d, P, r, e, p, e, n, d, S, y, s, t, e, m, P, r, o, m, p, t, E, f, f, e, c, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, e, p, e, n, d, S, y, s, t, e, m, P, r, o, m, p, t, ", ,, 
):

class VirtualModelCustomFieldPrependSystemPromptEffectDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelCustomFieldPrependSystemPromptEffect."""

class VirtualModelCustomFieldSetJinjaVariableEffect(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, C, u, s, t, o, m, F, i, e, l, d, S, e, t, J, i, n, j, a, V, a, r, i, a, b, l, e, E, f, f, e, c, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, e, t, J, i, n, j, a, V, a, r, i, a, b, l, e, ", ,, 
):

class VirtualModelCustomFieldSetJinjaVariableEffectDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelCustomFieldSetJinjaVariableEffect."""

class VirtualModelDefinitionMetadataOverrides(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, D, e, f, i, n, i, t, i, o, n, M, e, t, a, d, a, t, a, O, v, e, r, r, i, d, e, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class VirtualModelDefinitionMetadataOverridesDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelDefinitionMetadataOverrides."""

class Config(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for Config."""

class VirtualModelSuggestion(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, S, u, g, g, e, s, t, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class VirtualModelSuggestionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelSuggestion."""

class EmbeddingRpcUnloadModelParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, U, n, l, o, a, d, M, o, d, e, l, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcUnloadModelParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcUnloadModelParameter."""

class PseudoEmbeddingRpcUnloadModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, U, n, l, o, a, d, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcUnloadModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcUnloadModel."""

class EmbeddingRpcEmbedStringReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, E, m, b, e, d, S, t, r, i, n, g, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcEmbedStringReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcEmbedStringReturns."""

class EmbeddingRpcTokenizeReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, T, o, k, e, n, i, z, e, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcTokenizeReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcTokenizeReturns."""

class EmbeddingRpcCountTokensReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, C, o, u, n, t, T, o, k, e, n, s, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcCountTokensReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcCountTokensReturns."""

class EmbeddingChannelLoadModelCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingChannelLoadModelCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelLoadModelCreationParameter."""

class EmbeddingChannelGetOrLoadCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingChannelGetOrLoadCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadCreationParameter."""

class FilesRpcGetLocalFileAbsolutePathParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, R, p, c, G, e, t, L, o, c, a, l, F, i, l, e, A, b, s, o, l, u, t, e, P, a, t, h, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesRpcGetLocalFileAbsolutePathParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesRpcGetLocalFileAbsolutePathParameter."""

class FilesRpcGetLocalFileAbsolutePathReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, R, p, c, G, e, t, L, o, c, a, l, F, i, l, e, A, b, s, o, l, u, t, e, P, a, t, h, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesRpcGetLocalFileAbsolutePathReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesRpcGetLocalFileAbsolutePathReturns."""

class PseudoFilesRpcGetLocalFileAbsolutePath(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, F, i, l, e, s, R, p, c, G, e, t, L, o, c, a, l, F, i, l, e, A, b, s, o, l, u, t, e, P, a, t, h, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoFilesRpcGetLocalFileAbsolutePathDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoFilesRpcGetLocalFileAbsolutePath."""

class FilesRpcUploadFileBase64Parameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, R, p, c, U, p, l, o, a, d, F, i, l, e, B, a, s, e, 6, 4, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesRpcUploadFileBase64ParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesRpcUploadFileBase64Parameter."""

class FilesRpcUploadFileBase64Returns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, R, p, c, U, p, l, o, a, d, F, i, l, e, B, a, s, e, 6, 4, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesRpcUploadFileBase64ReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesRpcUploadFileBase64Returns."""

class PseudoFilesRpcUploadFileBase64(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, F, i, l, e, s, R, p, c, U, p, l, o, a, d, F, i, l, e, B, a, s, e, 6, 4, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoFilesRpcUploadFileBase64Dict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoFilesRpcUploadFileBase64."""

class FilesRpcGetDocumentParsingLibraryParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, R, p, c, G, e, t, D, o, c, u, m, e, n, t, P, a, r, s, i, n, g, L, i, b, r, a, r, y, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesRpcGetDocumentParsingLibraryParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesRpcGetDocumentParsingLibraryParameter."""

class FilesRpcGetDocumentParsingLibraryReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, R, p, c, G, e, t, D, o, c, u, m, e, n, t, P, a, r, s, i, n, g, L, i, b, r, a, r, y, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesRpcGetDocumentParsingLibraryReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesRpcGetDocumentParsingLibraryReturns."""

class PseudoFilesRpcGetDocumentParsingLibrary(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, F, i, l, e, s, R, p, c, G, e, t, D, o, c, u, m, e, n, t, P, a, r, s, i, n, g, L, i, b, r, a, r, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoFilesRpcGetDocumentParsingLibraryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoFilesRpcGetDocumentParsingLibrary."""

class FilesChannelParseDocumentCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, P, a, r, s, e, D, o, c, u, m, e, n, t, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesChannelParseDocumentCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelParseDocumentCreationParameter."""

class LlmRpcUnloadModelParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, U, n, l, o, a, d, M, o, d, e, l, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcUnloadModelParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcUnloadModelParameter."""

class PseudoLlmRpcUnloadModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, U, n, l, o, a, d, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcUnloadModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcUnloadModel."""

class LlmRpcApplyPromptTemplateReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, A, p, p, l, y, P, r, o, m, p, t, T, e, m, p, l, a, t, e, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcApplyPromptTemplateReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcApplyPromptTemplateReturns."""

class LlmRpcTokenizeReturns(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, T, o, k, e, n, i, z, e, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmRpcTokenizeReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcTokenizeReturns."""

class LlmRpcCountTokensReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, C, o, u, n, t, T, o, k, e, n, s, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcCountTokensReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcCountTokensReturns."""

class LlmChannelLoadModelCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmChannelLoadModelCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelLoadModelCreationParameter."""

class LlmChannelGetOrLoadCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmChannelGetOrLoadCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadCreationParameter."""

class PseudoPluginsRpcReindexPlugins:

class PluginsRpcProcessingPullHistoryParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, P, u, l, l, H, i, s, t, o, r, y, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingPullHistoryParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingPullHistoryParameter."""

class PluginsRpcProcessingGetOrLoadModelParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, G, e, t, O, r, L, o, a, d, M, o, d, e, l, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingGetOrLoadModelParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingGetOrLoadModelParameter."""

class PluginsRpcProcessingGetOrLoadModelReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, G, e, t, O, r, L, o, a, d, M, o, d, e, l, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingGetOrLoadModelReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingGetOrLoadModelReturns."""

class PseudoPluginsRpcProcessingGetOrLoadModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, G, e, t, O, r, L, o, a, d, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingGetOrLoadModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingGetOrLoadModel."""

class PluginsRpcProcessingHasStatusParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, s, S, t, a, t, u, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingHasStatusParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingHasStatusParameter."""

class PseudoPluginsRpcProcessingHasStatus(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, s, S, t, a, t, u, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingHasStatusDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingHasStatus."""

class PluginsRpcProcessingNeedsNamingParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, N, e, e, d, s, N, a, m, i, n, g, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingNeedsNamingParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingNeedsNamingParameter."""

class PseudoPluginsRpcProcessingNeedsNaming(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, N, e, e, d, s, N, a, m, i, n, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingNeedsNamingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingNeedsNaming."""

class PluginsRpcProcessingSuggestNameParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, S, u, g, g, e, s, t, N, a, m, e, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingSuggestNameParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingSuggestNameParameter."""

class PseudoPluginsRpcProcessingSuggestName(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, S, u, g, g, e, s, t, N, a, m, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingSuggestNameDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingSuggestName."""

class PluginsRpcProcessingSetSenderNameParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, S, e, t, S, e, n, d, e, r, N, a, m, e, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingSetSenderNameParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingSetSenderNameParameter."""

class PseudoPluginsRpcProcessingSetSenderName(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, S, e, t, S, e, n, d, e, r, N, a, m, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingSetSenderNameDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingSetSenderName."""

class PluginsRpcSetConfigSchematicsParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, S, e, t, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcSetConfigSchematicsParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcSetConfigSchematicsParameter."""

class PseudoPluginsRpcSetConfigSchematics(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, S, e, t, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcSetConfigSchematicsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcSetConfigSchematics."""

class PluginsRpcSetGlobalConfigSchematicsParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, S, e, t, G, l, o, b, a, l, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcSetGlobalConfigSchematicsParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcSetGlobalConfigSchematicsParameter."""

class PseudoPluginsRpcSetGlobalConfigSchematics(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, S, e, t, G, l, o, b, a, l, C, o, n, f, i, g, S, c, h, e, m, a, t, i, c, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcSetGlobalConfigSchematicsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcSetGlobalConfigSchematics."""

class PseudoPluginsRpcPluginInitCompleted:

class RepositoryRpcSearchModelsParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, S, e, a, r, c, h, M, o, d, e, l, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcSearchModelsParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcSearchModelsParameter."""

class RepositoryRpcGetModelDownloadOptionsReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, G, e, t, M, o, d, e, l, D, o, w, n, l, o, a, d, O, p, t, i, o, n, s, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcGetModelDownloadOptionsReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcGetModelDownloadOptionsReturns."""

class RepositoryRpcInstallPluginDependenciesParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, I, n, s, t, a, l, l, P, l, u, g, i, n, D, e, p, e, n, d, e, n, c, i, e, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcInstallPluginDependenciesParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcInstallPluginDependenciesParameter."""

class PseudoRepositoryRpcInstallPluginDependencies(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, R, p, c, I, n, s, t, a, l, l, P, l, u, g, i, n, D, e, p, e, n, d, e, n, c, i, e, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryRpcInstallPluginDependenciesDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryRpcInstallPluginDependencies."""

class RepositoryRpcGetLocalArtifactFilesParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, G, e, t, L, o, c, a, l, A, r, t, i, f, a, c, t, F, i, l, e, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcGetLocalArtifactFilesParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcGetLocalArtifactFilesParameter."""

class RepositoryRpcGetLocalArtifactFilesReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, G, e, t, L, o, c, a, l, A, r, t, i, f, a, c, t, F, i, l, e, s, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcGetLocalArtifactFilesReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcGetLocalArtifactFilesReturns."""

class PseudoRepositoryRpcGetLocalArtifactFiles(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, R, p, c, G, e, t, L, o, c, a, l, A, r, t, i, f, a, c, t, F, i, l, e, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryRpcGetLocalArtifactFilesDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryRpcGetLocalArtifactFiles."""

class RepositoryRpcLoginWithPreAuthenticatedKeysParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, L, o, g, i, n, W, i, t, h, P, r, e, A, u, t, h, e, n, t, i, c, a, t, e, d, K, e, y, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryRpcLoginWithPreAuthenticatedKeysParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcLoginWithPreAuthenticatedKeysParameter."""

class RepositoryRpcLoginWithPreAuthenticatedKeysReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, L, o, g, i, n, W, i, t, h, P, r, e, A, u, t, h, e, n, t, i, c, a, t, e, d, K, e, y, s, R, e, t, u, r, n, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryRpcLoginWithPreAuthenticatedKeysReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcLoginWithPreAuthenticatedKeysReturns."""

class PseudoRepositoryRpcLoginWithPreAuthenticatedKeys(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, R, p, c, L, o, g, i, n, W, i, t, h, P, r, e, A, u, t, h, e, n, t, i, c, a, t, e, d, K, e, y, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryRpcLoginWithPreAuthenticatedKeysDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryRpcLoginWithPreAuthenticatedKeys."""

class DownloadModelChannelRequest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, o, w, n, l, o, a, d, M, o, d, e, l, C, h, a, n, n, e, l, R, e, q, u, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class DownloadModelChannelRequestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadModelCreationParameter."""

class RepositoryChannelDownloadArtifactCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, A, r, t, i, f, a, c, t, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryChannelDownloadArtifactCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadArtifactCreationParameter."""

class RepositoryChannelPushArtifactCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, P, u, s, h, A, r, t, i, f, a, c, t, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryChannelPushArtifactCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelPushArtifactCreationParameter."""

class RepositoryChannelCreateArtifactDownloadPlanCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanCreationPar..."""

class SystemRpcVersionReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, y, s, t, e, m, R, p, c, V, e, r, s, i, o, n, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class SystemRpcVersionReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for SystemRpcVersionReturns."""

class PseudoSystemRpcVersion(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, S, y, s, t, e, m, R, p, c, V, e, r, s, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoSystemRpcVersionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoSystemRpcVersion."""

class SystemRpcSetExperimentFlagParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, y, s, t, e, m, R, p, c, S, e, t, E, x, p, e, r, i, m, e, n, t, F, l, a, g, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class SystemRpcSetExperimentFlagParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for SystemRpcSetExperimentFlagParameter."""

class PseudoSystemRpcSetExperimentFlag(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, S, y, s, t, e, m, R, p, c, S, e, t, E, x, p, e, r, i, m, e, n, t, F, l, a, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoSystemRpcSetExperimentFlagDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoSystemRpcSetExperimentFlag."""

class PseudoSystemRpcGetExperimentFlags(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, S, y, s, t, e, m, R, p, c, G, e, t, E, x, p, e, r, i, m, e, n, t, F, l, a, g, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoSystemRpcGetExperimentFlagsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoSystemRpcGetExperimentFlags."""

class PseudoSystemChannelAlive:

class ToolResultMessage(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, R, e, s, u, l, t, M, e, s, s, a, g, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", r, o, l, e, ", ,,  , t, a, g, =, ", t, o, o, l, ", 
):

class ToolResultMessageDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessageDataTool."""

class DiagnosticsLogEventDataLlmPredictionInput(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, i, a, g, n, o, s, t, i, c, s, L, o, g, E, v, e, n, t, D, a, t, a, L, l, m, P, r, e, d, i, c, t, i, o, n, I, n, p, u, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class DiagnosticsLogEventDataLlmPredictionInputDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DiagnosticsLogEventDataLlmPredictionInput."""

class ErrorDisplayDataGenericSpecificModelUnloaded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, S, p, e, c, i, f, i, c, M, o, d, e, l, U, n, l, o, a, d, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., s, p, e, c, i, f, i, c, M, o, d, e, l, U, n, l, o, a, d, e, d, ", ,, 
):

class ErrorDisplayDataGenericSpecificModelUnloadedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericSpecificModelUnloaded."""

class ErrorDisplayDataGenericPathNotFound(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, P, a, t, h, N, o, t, F, o, u, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., p, a, t, h, N, o, t, F, o, u, n, d, ", ,, 
):

class ErrorDisplayDataGenericPathNotFoundDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericPathNotFound."""

class ErrorDisplayDataGenericIdentifierNotFound(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, I, d, e, n, t, i, f, i, e, r, N, o, t, F, o, u, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., i, d, e, n, t, i, f, i, e, r, N, o, t, F, o, u, n, d, ", ,, 
):

class ErrorDisplayDataGenericIdentifierNotFoundDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericIdentifierNotFound."""

class ErrorDisplayDataGenericDomainMismatch(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, D, o, m, a, i, n, M, i, s, m, a, t, c, h, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., d, o, m, a, i, n, M, i, s, m, a, t, c, h, ", ,, 
):

class ErrorDisplayDataGenericDomainMismatchDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericDomainMismatch."""

class ErrorDisplayDataGenericEngineDoesNotSupportFeature(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, E, n, g, i, n, e, D, o, e, s, N, o, t, S, u, p, p, o, r, t, F, e, a, t, u, r, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., e, n, g, i, n, e, D, o, e, s, N, o, t, S, u, p, p, o, r, t, F, e, a, t, u, r, e, ", ,, 
):

class ErrorDisplayDataGenericEngineDoesNotSupportFeatureDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericEngineDoesNotSupportFeature."""

class AvailablePresetsSampleItem(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, v, a, i, l, a, b, l, e, P, r, e, s, e, t, s, S, a, m, p, l, e, I, t, e, m, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class AvailablePresetsSampleItemDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for AvailablePresetsSampleItem."""

class ErrorDisplayDataGenericPresetNotFound(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, P, r, e, s, e, t, N, o, t, F, o, u, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., p, r, e, s, e, t, N, o, t, F, o, u, n, d, ", ,, 
):

class ErrorDisplayDataGenericPresetNotFoundDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericPresetNotFound."""

class ParsedFileIdentifierLocal(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, a, r, s, e, d, F, i, l, e, I, d, e, n, t, i, f, i, e, r, L, o, c, a, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", l, o, c, a, l, ", ,, 
):

class ParsedFileIdentifierLocalDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ParsedFileIdentifierLocal."""

class ParsedFileIdentifierBase64(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, a, r, s, e, d, F, i, l, e, I, d, e, n, t, i, f, i, e, r, B, a, s, e, 6, 4, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", b, a, s, e, 6, 4, ", ,, 
):

class ParsedFileIdentifierBase64Dict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ParsedFileIdentifierBase64."""

class KvConfigFieldDependencyConditionEquals(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, F, i, e, l, d, D, e, p, e, n, d, e, n, c, y, C, o, n, d, i, t, i, o, n, E, q, u, a, l, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", e, q, u, a, l, s, ", ,, 
):

class KvConfigFieldDependencyConditionEqualsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigFieldDependencyConditionEquals."""

class KvConfigFieldDependencyConditionNotEquals(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, F, i, e, l, d, D, e, p, e, n, d, e, n, c, y, C, o, n, d, i, t, i, o, n, N, o, t, E, q, u, a, l, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", n, o, t, E, q, u, a, l, s, ", ,, 
):

class KvConfigFieldDependencyConditionNotEqualsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigFieldDependencyConditionNotEquals."""

class ContentBlockStyleDefault(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", C, o, n, t, e, n, t, B, l, o, c, k, S, t, y, l, e, D, e, f, a, u, l, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, e, f, a, u, l, t, ", ,, 
):

class ContentBlockStyleDefaultDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ContentBlockStyleDefault."""

class ContentBlockStyleCustomLabel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", C, o, n, t, e, n, t, B, l, o, c, k, S, t, y, l, e, C, u, s, t, o, m, L, a, b, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, u, s, t, o, m, L, a, b, e, l, ", ,, 
):

class ContentBlockStyleCustomLabelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ContentBlockStyleCustomLabel."""

class ContentBlockStyleThinking(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", C, o, n, t, e, n, t, B, l, o, c, k, S, t, y, l, e, T, h, i, n, k, i, n, g, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, h, i, n, k, i, n, g, ", ,, 
):

class ContentBlockStyleThinkingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ContentBlockStyleThinking."""

class LlmContextReferenceJsonFile(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, o, n, t, e, x, t, R, e, f, e, r, e, n, c, e, J, s, o, n, F, i, l, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", j, s, o, n, F, i, l, e, ", ,, 
):

class LlmContextReferenceJsonFileDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmContextReferenceJsonFile."""

class LlmContextReferenceYamlFile(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, o, n, t, e, x, t, R, e, f, e, r, e, n, c, e, Y, a, m, l, F, i, l, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", y, a, m, l, F, i, l, e, ", ,, 
):

class LlmContextReferenceYamlFileDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmContextReferenceYamlFile."""

class LlmToolParametersObject(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, T, o, o, l, P, a, r, a, m, e, t, e, r, s, O, b, j, e, c, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmToolParametersObjectDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmToolParametersObject."""

class LlmToolUseSettingNone(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, T, o, o, l, U, s, e, S, e, t, t, i, n, g, N, o, n, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", n, o, n, e, ", ,, 
):

class LlmToolUseSettingNoneDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmToolUseSettingNone."""

class ProcessingRequestResponseConfirmToolCallResultAllow(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, R, e, q, u, e, s, t, R, e, s, p, o, n, s, e, C, o, n, f, i, r, m, T, o, o, l, C, a, l, l, R, e, s, u, l, t, A, l, l, o, w, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, l, l, o, w, ", ,, 
):

class ProcessingRequestResponseConfirmToolCallResultAllowDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingRequestResponseConfirmToolCallResultAllow."""

class ProcessingRequestResponseConfirmToolCallResultDeny(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, R, e, q, u, e, s, t, R, e, s, p, o, n, s, e, C, o, n, f, i, r, m, T, o, o, l, C, a, l, l, R, e, s, u, l, t, D, e, n, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, e, n, y, ", ,, 
):

class ProcessingRequestResponseConfirmToolCallResultDenyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingRequestResponseConfirmToolCallResultDeny."""

class BlockLocationBeforeId(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", B, l, o, c, k, L, o, c, a, t, i, o, n, B, e, f, o, r, e, I, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", b, e, f, o, r, e, I, d, ", ,, 
):

class BlockLocationBeforeIdDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for BlockLocationBeforeId."""

class BlockLocationAfterId(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", B, l, o, c, k, L, o, c, a, t, i, o, n, A, f, t, e, r, I, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, f, t, e, r, I, d, ", ,, 
):

class BlockLocationAfterIdDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for BlockLocationAfterId."""

class ToolStatusStepStateStatusGeneratingToolCall(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, G, e, n, e, r, a, t, i, n, g, T, o, o, l, C, a, l, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, a, t, i, n, g, T, o, o, l, C, a, l, l, ", ,, 
):

class ToolStatusStepStateStatusGeneratingToolCallDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusGeneratingToolCall."""

class ToolStatusStepStateStatusToolCallGenerationFailed(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, ", ,, 
):

class ToolStatusStepStateStatusToolCallGenerationFailedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusToolCallGenerationFailed."""

class ToolStatusStepStateStatusToolCallQueued(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, T, o, o, l, C, a, l, l, Q, u, e, u, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, Q, u, e, u, e, d, ", ,, 
):

class ToolStatusStepStateStatusToolCallQueuedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusToolCallQueued."""

class ToolStatusStepStateStatusConfirmingToolCall(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, C, o, n, f, i, r, m, i, n, g, T, o, o, l, C, a, l, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, f, i, r, m, i, n, g, T, o, o, l, C, a, l, l, ", ,, 
):

class ToolStatusStepStateStatusConfirmingToolCallDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusConfirmingToolCall."""

class ToolStatusStepStateStatusToolCallDenied(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, T, o, o, l, C, a, l, l, D, e, n, i, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, D, e, n, i, e, d, ", ,, 
):

class ToolStatusStepStateStatusToolCallDeniedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusToolCallDenied."""

class ToolStatusStepStateStatusCallingTool(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, C, a, l, l, i, n, g, T, o, o, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, a, l, l, i, n, g, T, o, o, l, ", ,, 
):

class ToolStatusStepStateStatusCallingToolDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusCallingTool."""

class ToolStatusStepStateStatusToolCallFailed(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, T, o, o, l, C, a, l, l, F, a, i, l, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, F, a, i, l, e, d, ", ,, 
):

class ToolStatusStepStateStatusToolCallFailedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusToolCallFailed."""

class ToolStatusStepStateStatusToolCallSucceeded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, S, t, a, t, u, s, T, o, o, l, C, a, l, l, S, u, c, c, e, e, d, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, S, u, c, c, e, e, d, e, d, ", ,, 
):

class ToolStatusStepStateStatusToolCallSucceededDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepStateStatusToolCallSucceeded."""

class ModelSpecifierInstanceReference(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, p, e, c, i, f, i, e, r, I, n, s, t, a, n, c, e, R, e, f, e, r, e, n, c, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", i, n, s, t, a, n, c, e, R, e, f, e, r, e, n, c, e, ", ,, 
):

class ModelSpecifierInstanceReferenceDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSpecifierInstanceReference."""

class ArtifactDownloadPlanNodeArtifact(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, N, o, d, e, A, r, t, i, f, a, c, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, r, t, i, f, a, c, t, ", ,, 
):

class ArtifactDownloadPlanNodeArtifactDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactDownloadPlanNodeArtifact."""

class ArtifactDownloadPlanNodeModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, N, o, d, e, M, o, d, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", m, o, d, e, l, ", ,, 
):

class ArtifactDownloadPlanNodeModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactDownloadPlanNodeModel."""

class ModelSearchResultIdentifierCatalog(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, e, a, r, c, h, R, e, s, u, l, t, I, d, e, n, t, i, f, i, e, r, C, a, t, a, l, o, g, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, a, t, a, l, o, g, ", ,, 
):

class ModelSearchResultIdentifierCatalogDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSearchResultIdentifierCatalog."""

class ModelSearchResultIdentifierHf(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, e, a, r, c, h, R, e, s, u, l, t, I, d, e, n, t, i, f, i, e, r, H, f, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", h, f, ", ,, 
):

class ModelSearchResultIdentifierHfDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSearchResultIdentifierHf."""

class RetrievalChunkingMethodRecursiveV1(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, t, r, i, e, v, a, l, C, h, u, n, k, i, n, g, M, e, t, h, o, d, R, e, c, u, r, s, i, v, e, V, 1, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RetrievalChunkingMethodRecursiveV1Dict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RetrievalChunkingMethodRecursiveV1."""

class DiagnosticsChannelStreamLogsToServerPacketStop(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, i, a, g, n, o, s, t, i, c, s, C, h, a, n, n, e, l, S, t, r, e, a, m, L, o, g, s, T, o, S, e, r, v, e, r, P, a, c, k, e, t, S, t, o, p, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class DiagnosticsChannelStreamLogsToServerPacketStopDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DiagnosticsChannelStreamLogsToServerPacketStop."""

class EmbeddingChannelLoadModelToClientPacketProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, o, g, r, e, s, s, ", ,, 
):

class EmbeddingChannelLoadModelToClientPacketProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelLoadModelToClientPacketProgress."""

class EmbeddingChannelLoadModelToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingChannelLoadModelToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelLoadModelToServerPacketCancel."""

class EmbeddingChannelGetOrLoadToClientPacketLoadProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, L, o, a, d, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", l, o, a, d, P, r, o, g, r, e, s, s, ", ,, 
):

class EmbeddingChannelGetOrLoadToClientPacketLoadProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadToClientPacketLoadProgress."""

class EmbeddingChannelGetOrLoadToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingChannelGetOrLoadToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadToServerPacketCancel."""

class FilesChannelRetrieveToClientPacketOnFileProcessList(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, F, i, l, e, P, r, o, c, e, s, s, L, i, s, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, F, i, l, e, P, r, o, c, e, s, s, L, i, s, t, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnFileProcessListDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnFileProcessList."""

class FilesChannelRetrieveToClientPacketOnFileProcessingStart(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, a, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, a, r, t, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnFileProcessingStartDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnFileProcessingStar..."""

class FilesChannelRetrieveToClientPacketOnFileProcessingEnd(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, E, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, E, n, d, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnFileProcessingEndDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnFileProcessingEnd."""

class FilesChannelRetrieveToClientPacketOnFileProcessingStepStart(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, e, p, S, t, a, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, e, p, S, t, a, r, t, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnFileProcessingStepStartDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnFileProcessingStep..."""

class FilesChannelRetrieveToClientPacketOnFileProcessingStepProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, e, p, P, r, o, g, r, e, s, s, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, e, p, P, r, o, g, r, e, s, s, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnFileProcessingStepProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnFileProcessingStep..."""

class FilesChannelRetrieveToClientPacketOnFileProcessingStepEnd(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, e, p, E, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, F, i, l, e, P, r, o, c, e, s, s, i, n, g, S, t, e, p, E, n, d, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnFileProcessingStepEndDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnFileProcessingStep..."""

class FilesChannelRetrieveToClientPacketOnSearchingStart(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, S, e, a, r, c, h, i, n, g, S, t, a, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, S, e, a, r, c, h, i, n, g, S, t, a, r, t, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnSearchingStartDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnSearchingStart."""

class FilesChannelRetrieveToClientPacketOnSearchingEnd(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, O, n, S, e, a, r, c, h, i, n, g, E, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", o, n, S, e, a, r, c, h, i, n, g, E, n, d, ", ,, 
):

class FilesChannelRetrieveToClientPacketOnSearchingEndDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketOnSearchingEnd."""

class FilesChannelRetrieveToClientPacketResult(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, C, l, i, e, n, t, P, a, c, k, e, t, R, e, s, u, l, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", r, e, s, u, l, t, ", ,, 
):

class FilesChannelRetrieveToClientPacketResultDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToClientPacketResult."""

class FilesChannelRetrieveToServerPacketStop(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, T, o, S, e, r, v, e, r, P, a, c, k, e, t, S, t, o, p, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesChannelRetrieveToServerPacketStopDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveToServerPacketStop."""

class FilesChannelParseDocumentToClientPacketParserLoaded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, P, a, r, s, e, D, o, c, u, m, e, n, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, a, r, s, e, r, L, o, a, d, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, a, r, s, e, r, L, o, a, d, e, d, ", ,, 
):

class FilesChannelParseDocumentToClientPacketParserLoadedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelParseDocumentToClientPacketParserLoaded."""

class FilesChannelParseDocumentToClientPacketProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, P, a, r, s, e, D, o, c, u, m, e, n, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, o, g, r, e, s, s, ", ,, 
):

class FilesChannelParseDocumentToClientPacketProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelParseDocumentToClientPacketProgress."""

class FilesChannelParseDocumentToClientPacketResult(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, P, a, r, s, e, D, o, c, u, m, e, n, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, R, e, s, u, l, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", r, e, s, u, l, t, ", ,, 
):

class FilesChannelParseDocumentToClientPacketResultDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelParseDocumentToClientPacketResult."""

class FilesChannelParseDocumentToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, P, a, r, s, e, D, o, c, u, m, e, n, t, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesChannelParseDocumentToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelParseDocumentToServerPacketCancel."""

class LlmChannelLoadModelToClientPacketProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, o, g, r, e, s, s, ", ,, 
):

class LlmChannelLoadModelToClientPacketProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelLoadModelToClientPacketProgress."""

class LlmChannelLoadModelToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmChannelLoadModelToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelLoadModelToServerPacketCancel."""

class LlmChannelGetOrLoadToClientPacketLoadProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, L, o, a, d, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", l, o, a, d, P, r, o, g, r, e, s, s, ", ,, 
):

class LlmChannelGetOrLoadToClientPacketLoadProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadToClientPacketLoadProgress."""

class LlmChannelGetOrLoadToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmChannelGetOrLoadToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadToServerPacketCancel."""

class Logprob(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, o, g, p, r, o, b, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LogprobDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for Logprob."""

class LlmChannelPredictToClientPacketFragment(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, F, r, a, g, m, e, n, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", f, r, a, g, m, e, n, t, ", ,, 
):

class LlmChannelPredictToClientPacketFragmentDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketFragment."""

class LlmChannelPredictToClientPacketPromptProcessingProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, r, o, m, p, t, P, r, o, c, e, s, s, i, n, g, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, o, m, p, t, P, r, o, c, e, s, s, i, n, g, P, r, o, g, r, e, s, s, ", ,, 
):

class LlmChannelPredictToClientPacketPromptProcessingProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketPromptProcessingProgres..."""

class LlmChannelPredictToClientPacketToolCallGenerationStart(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, S, t, a, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, S, t, a, r, t, ", ,, 
):

class LlmChannelPredictToClientPacketToolCallGenerationStartDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketToolCallGenerationStart..."""

class LlmChannelPredictToClientPacketToolCallGenerationNameReceived(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, N, a, m, e, R, e, c, e, i, v, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, N, a, m, e, R, e, c, e, i, v, e, d, ", ,, 
):

class LlmChannelPredictToClientPacketToolCallGenerationNameReceivedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketToolCallGenerationNameR..."""

class LlmChannelPredictToClientPacketToolCallGenerationArgumentFragmentGenerated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, ", ,, 
):

class LlmChannelPredictToClientPacketToolCallGenerationArgumentFragmentGeneratedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketToolCallGenerationArgum..."""

class LlmChannelPredictToClientPacketToolCallGenerationFailed(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, ", ,, 
):

class LlmChannelPredictToClientPacketToolCallGenerationFailedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketToolCallGenerationFaile..."""

class LlmChannelPredictToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmChannelPredictToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToServerPacketCancel."""

class LlmChannelGenerateWithGeneratorToClientPacketFragment(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, F, r, a, g, m, e, n, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", f, r, a, g, m, e, n, t, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketFragmentDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketFragment."""

class LlmChannelGenerateWithGeneratorToClientPacketPromptProcessingProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, r, o, m, p, t, P, r, o, c, e, s, s, i, n, g, P, r, o, g, r, e, s, s, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, o, m, p, t, P, r, o, c, e, s, s, i, n, g, P, r, o, g, r, e, s, s, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketPromptProcessingProgressDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketPromptPro..."""

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationStart(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, S, t, a, r, t, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, S, t, a, r, t, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationStartDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketToolCallG..."""

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationNameReceived(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, N, a, m, e, R, e, c, e, i, v, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, N, a, m, e, R, e, c, e, i, v, e, d, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationNameReceivedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketToolCallG..."""

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationArgumentFragmentGenerated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationArgumentFragmentGeneratedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketToolCallG..."""

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationFailed(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationFailedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketToolCallG..."""

class LlmChannelGenerateWithGeneratorToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketSuccess."""

class LlmChannelGenerateWithGeneratorToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class LlmChannelGenerateWithGeneratorToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToServerPacketCancel."""

class PluginsChannelRegisterDevelopmentPluginToClientPacketReady(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, R, e, g, i, s, t, e, r, D, e, v, e, l, o, p, m, e, n, t, P, l, u, g, i, n, T, o, C, l, i, e, n, t, P, a, c, k, e, t, R, e, a, d, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class PluginsChannelRegisterDevelopmentPluginToClientPacketReadyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelRegisterDevelopmentPluginToClientPacketR..."""

class PluginsChannelRegisterDevelopmentPluginToServerPacketEnd(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, R, e, g, i, s, t, e, r, D, e, v, e, l, o, p, m, e, n, t, P, l, u, g, i, n, T, o, S, e, r, v, e, r, P, a, c, k, e, t, E, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class PluginsChannelRegisterDevelopmentPluginToServerPacketEndDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelRegisterDevelopmentPluginToServerPacketE..."""

class PluginsChannelSetPromptPreprocessorToClientPacketAbort(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, o, m, p, t, P, r, e, p, r, o, c, e, s, s, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, b, o, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, ", ,, 
):

class PluginsChannelSetPromptPreprocessorToClientPacketAbortDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToClientPacketAbort..."""

class PluginsChannelSetPromptPreprocessorToServerPacketAborted(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, o, m, p, t, P, r, e, p, r, o, c, e, s, s, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, A, b, o, r, t, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, e, d, ", ,, 
):

class PluginsChannelSetPromptPreprocessorToServerPacketAbortedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToServerPacketAbort..."""

class PluginsChannelSetPromptPreprocessorToServerPacketError(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, o, m, p, t, P, r, e, p, r, o, c, e, s, s, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, E, r, r, o, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", e, r, r, o, r, ", ,, 
):

class PluginsChannelSetPromptPreprocessorToServerPacketErrorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToServerPacketError..."""

class PluginsChannelSetPredictionLoopHandlerToClientPacketAbort(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, e, d, i, c, t, i, o, n, L, o, o, p, H, a, n, d, l, e, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, b, o, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, ", ,, 
):

class PluginsChannelSetPredictionLoopHandlerToClientPacketAbortDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPredictionLoopHandlerToClientPacketAb..."""

class PluginsChannelSetPredictionLoopHandlerToServerPacketComplete(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, e, d, i, c, t, i, o, n, L, o, o, p, H, a, n, d, l, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, o, m, p, l, e, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, m, p, l, e, t, e, ", ,, 
):

class PluginsChannelSetPredictionLoopHandlerToServerPacketCompleteDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPredictionLoopHandlerToServerPacketCo..."""

class PluginsChannelSetPredictionLoopHandlerToServerPacketAborted(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, e, d, i, c, t, i, o, n, L, o, o, p, H, a, n, d, l, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, A, b, o, r, t, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, e, d, ", ,, 
):

class PluginsChannelSetPredictionLoopHandlerToServerPacketAbortedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPredictionLoopHandlerToServerPacketAb..."""

class PluginsChannelSetPredictionLoopHandlerToServerPacketError(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, e, d, i, c, t, i, o, n, L, o, o, p, H, a, n, d, l, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, E, r, r, o, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", e, r, r, o, r, ", ,, 
):

class PluginsChannelSetPredictionLoopHandlerToServerPacketErrorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPredictionLoopHandlerToServerPacketEr..."""

class PluginsChannelSetToolsProviderToClientPacketDiscardSession(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, D, i, s, c, a, r, d, S, e, s, s, i, o, n, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, i, s, c, a, r, d, S, e, s, s, i, o, n, ", ,, 
):

class PluginsChannelSetToolsProviderToClientPacketDiscardSessionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToClientPacketDiscardSes..."""

class PluginsChannelSetToolsProviderToClientPacketCallTool(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, C, a, l, l, T, o, o, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, a, l, l, T, o, o, l, ", ,, 
):

class PluginsChannelSetToolsProviderToClientPacketCallToolDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToClientPacketCallTool."""

class PluginsChannelSetToolsProviderToClientPacketAbortToolCall(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, b, o, r, t, T, o, o, l, C, a, l, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, T, o, o, l, C, a, l, l, ", ,, 
):

class PluginsChannelSetToolsProviderToClientPacketAbortToolCallDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToClientPacketAbortToolC..."""

class PluginsChannelSetToolsProviderToServerPacketSessionInitializationFailed(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, S, e, s, s, i, o, n, I, n, i, t, i, a, l, i, z, a, t, i, o, n, F, a, i, l, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, e, s, s, i, o, n, I, n, i, t, i, a, l, i, z, a, t, i, o, n, F, a, i, l, e, d, ", ,, 
):

class PluginsChannelSetToolsProviderToServerPacketSessionInitializationFailedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToServerPacketSessionIni..."""

class PluginsChannelSetToolsProviderToServerPacketToolCallComplete(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, C, o, m, p, l, e, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, C, o, m, p, l, e, t, e, ", ,, 
):

class PluginsChannelSetToolsProviderToServerPacketToolCallCompleteDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToServerPacketToolCallCo..."""

class PluginsChannelSetToolsProviderToServerPacketToolCallError(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, E, r, r, o, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, E, r, r, o, r, ", ,, 
):

class PluginsChannelSetToolsProviderToServerPacketToolCallErrorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToServerPacketToolCallEr..."""

class PluginsChannelSetToolsProviderToServerPacketToolCallStatus(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, S, t, a, t, u, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, S, t, a, t, u, s, ", ,, 
):

class PluginsChannelSetToolsProviderToServerPacketToolCallStatusDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToServerPacketToolCallSt..."""

class PluginsChannelSetToolsProviderToServerPacketToolCallWarn(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, W, a, r, n, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, W, a, r, n, ", ,, 
):

class PluginsChannelSetToolsProviderToServerPacketToolCallWarnDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToServerPacketToolCallWa..."""

class PluginsChannelSetGeneratorToClientPacketAbort(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, b, o, r, t, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, ", ,, 
):

class PluginsChannelSetGeneratorToClientPacketAbortDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToClientPacketAbort."""

class PluginsChannelSetGeneratorToServerPacketComplete(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, o, m, p, l, e, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, m, p, l, e, t, e, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketCompleteDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketComplete."""

class PluginsChannelSetGeneratorToServerPacketAborted(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, A, b, o, r, t, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, b, o, r, t, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketAbortedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketAborted."""

class PluginsChannelSetGeneratorToServerPacketError(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, E, r, r, o, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", e, r, r, o, r, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketErrorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketError."""

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationStarted(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, S, t, a, r, t, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, S, t, a, r, t, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationStartedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketToolCallGenera..."""

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationNameReceived(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, N, a, m, e, R, e, c, e, i, v, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, N, a, m, e, R, e, c, e, i, v, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationNameReceivedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketToolCallGenera..."""

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationArgumentFragmentGenerated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, A, r, g, u, m, e, n, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationArgumentFragmentGeneratedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketToolCallGenera..."""

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationFailed(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, F, a, i, l, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationFailedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketToolCallGenera..."""

class RepositoryChannelDownloadModelToClientPacketDownloadProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, D, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, ", ,, 
):

class RepositoryChannelDownloadModelToClientPacketDownloadProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadModelToClientPacketDownloadPr..."""

class RepositoryChannelDownloadModelToClientPacketStartFinalizing(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, t, a, r, t, F, i, n, a, l, i, z, i, n, g, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, r, t, F, i, n, a, l, i, z, i, n, g, ", ,, 
):

class RepositoryChannelDownloadModelToClientPacketStartFinalizingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadModelToClientPacketStartFinal..."""

class RepositoryChannelDownloadModelToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class RepositoryChannelDownloadModelToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadModelToClientPacketSuccess."""

class RepositoryChannelDownloadModelToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, M, o, d, e, l, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryChannelDownloadModelToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadModelToServerPacketCancel."""

class RepositoryChannelDownloadArtifactToClientPacketDownloadProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, A, r, t, i, f, a, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, D, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, ", ,, 
):

class RepositoryChannelDownloadArtifactToClientPacketDownloadProgressDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadArtifactToClientPacketDownloa..."""

class RepositoryChannelDownloadArtifactToClientPacketStartFinalizing(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, A, r, t, i, f, a, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, t, a, r, t, F, i, n, a, l, i, z, i, n, g, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, r, t, F, i, n, a, l, i, z, i, n, g, ", ,, 
):

class RepositoryChannelDownloadArtifactToClientPacketStartFinalizingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadArtifactToClientPacketStartFi..."""

class RepositoryChannelDownloadArtifactToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, A, r, t, i, f, a, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class RepositoryChannelDownloadArtifactToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadArtifactToClientPacketSuccess..."""

class RepositoryChannelDownloadArtifactToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, A, r, t, i, f, a, c, t, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryChannelDownloadArtifactToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelDownloadArtifactToServerPacketCancel."""

class RepositoryChannelPushArtifactToClientPacketMessage(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, P, u, s, h, A, r, t, i, f, a, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, M, e, s, s, a, g, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class RepositoryChannelPushArtifactToClientPacketMessageDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelPushArtifactToClientPacketMessage."""

class RepositoryChannelEnsureAuthenticatedToClientPacketAuthenticationUrl(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, E, n, s, u, r, e, A, u, t, h, e, n, t, i, c, a, t, e, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, u, t, h, e, n, t, i, c, a, t, i, o, n, U, r, l, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, u, t, h, e, n, t, i, c, a, t, i, o, n, U, r, l, ", ,, 
):

class RepositoryChannelEnsureAuthenticatedToClientPacketAuthenticationUrlDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for RepositoryChannelEnsureAuthenticatedToClientPacketAuth..."""

class RepositoryChannelEnsureAuthenticatedToClientPacketAuthenticated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, E, n, s, u, r, e, A, u, t, h, e, n, t, i, c, a, t, e, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, u, t, h, e, n, t, i, c, a, t, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, u, t, h, e, n, t, i, c, a, t, e, d, ", ,, 
):

class RepositoryChannelEnsureAuthenticatedToClientPacketAuthenticatedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelEnsureAuthenticatedToClientPacketAuth..."""

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketDownloadProgress(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, C, l, i, e, n, t, P, a, c, k, e, t, D, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", d, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketDownloadProgressDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToClientPac..."""

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketStartFinalizing(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, t, a, r, t, F, i, n, a, l, i, z, i, n, g, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, r, t, F, i, n, a, l, i, z, i, n, g, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketStartFinalizingDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToClientPac..."""

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToClientPac..."""

class RepositoryChannelCreateArtifactDownloadPlanToServerPacketCancel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, a, n, c, e, l, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, a, n, c, e, l, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToServerPacketCancelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToServerPac..."""

class RepositoryChannelCreateArtifactDownloadPlanToServerPacketCommit(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, o, m, m, i, t, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, m, m, i, t, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToServerPacketCommitDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToServerPac..."""

class ArtifactArtifactDependency(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, A, r, t, i, f, a, c, t, D, e, p, e, n, d, e, n, c, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, r, t, i, f, a, c, t, ", ,, 
):

class ArtifactArtifactDependencyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactArtifactDependency."""

class ArtifactDependencyBase(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, D, e, p, e, n, d, e, n, c, y, B, a, s, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class ArtifactDependencyBaseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactDependencyBase."""

class FileHandle(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, H, a, n, d, l, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", f, i, l, e, ", 
):

class FileHandleDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessagePartFileData."""

class ToolCallRequest(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, C, a, l, l, R, e, q, u, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ToolCallRequestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FunctionToolCallRequest."""

class DiagnosticsLogEvent(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, i, a, g, n, o, s, t, i, c, s, L, o, g, E, v, e, n, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class DiagnosticsLogEventDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DiagnosticsLogEvent."""

class EmbeddingModelInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, M, o, d, e, l, I, n, f, o, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", e, m, b, e, d, d, i, n, g, ", ,, 
):

class EmbeddingModelInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingModelInfo."""

class EmbeddingModelInstanceInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, M, o, d, e, l, I, n, s, t, a, n, c, e, I, n, f, o, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", e, m, b, e, d, d, i, n, g, ", ,, 
):

class EmbeddingModelInstanceInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingModelInstanceInfo."""

class GpuSplitConfig(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", G, p, u, S, p, l, i, t, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class GpuSplitConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for GpuSplitConfig."""

class GpuSetting(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", G, p, u, S, e, t, t, i, n, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class GpuSettingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for GpuSetting."""

class LlmLoadModelConfig(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmLoadModelConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmLoadModelConfig."""

class LlmInfo(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", l, l, m, "):

class LlmInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmInfo."""

class LlmInstanceInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, I, n, s, t, a, n, c, e, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", l, l, m, ", 
):

class LlmInstanceInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmInstanceInfo."""

class LlmPredictionFragmentInputOpts(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, P, r, e, d, i, c, t, i, o, n, F, r, a, g, m, e, n, t, I, n, p, u, t, O, p, t, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmPredictionFragmentInputOptsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmPredictionFragmentInputOpts."""

class LlmPredictionStats(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, P, r, e, d, i, c, t, i, o, n, S, t, a, t, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmPredictionStatsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmPredictionStats."""

class LlmPromptTemplate(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, P, r, o, m, p, t, T, e, m, p, l, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmPromptTemplateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmPromptTemplate."""

class LlmStructuredPredictionSetting(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, S, t, r, u, c, t, u, r, e, d, P, r, e, d, i, c, t, i, o, n, S, e, t, t, i, n, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmStructuredPredictionSettingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmStructuredPredictionSetting."""

class ProcessingUpdateContentBlockCreate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, C, r, e, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., c, r, e, a, t, e, ", ,, 
):

class ProcessingUpdateContentBlockCreateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockCreate."""

class ProcessingUpdateContentBlockSetStyle(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, S, e, t, S, t, y, l, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., s, e, t, S, t, y, l, e, ", ,, 
):

class ProcessingUpdateContentBlockSetStyleDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockSetStyle."""

class StatusStepState(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class StatusStepStateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for StatusStepState."""

class HuggingFaceModelDownloadSource(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", H, u, g, g, i, n, g, F, a, c, e, M, o, d, e, l, D, o, w, n, l, o, a, d, S, o, u, r, c, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class HuggingFaceModelDownloadSourceDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for HuggingFaceModelDownloadSource."""

class ModelInfoBase(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, I, n, f, o, B, a, s, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ModelInfoBaseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelInfoBase."""

class ModelInstanceInfoBase(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, I, n, s, t, a, n, c, e, I, n, f, o, B, a, s, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ModelInstanceInfoBaseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelInstanceInfoBase."""

class ModelQuery(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, Q, u, e, r, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ModelQueryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelQuery."""

class ArtifactDownloadPlan(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ArtifactDownloadPlanDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactDownloadPlan."""

class Accelerator(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, c, c, e, l, e, r, a, t, o, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class AcceleratorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for Accelerator."""

class Runtime(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, u, n, t, i, m, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class RuntimeDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for Runtime."""

class VirtualModelBooleanCustomFieldDefinition(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, B, o, o, l, e, a, n, C, u, s, t, o, m, F, i, e, l, d, D, e, f, i, n, i, t, i, o, n, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", b, o, o, l, e, a, n, ", ,, 
):

class VirtualModelBooleanCustomFieldDefinitionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelBooleanCustomFieldDefinition."""

class VirtualModelCustomFieldDefinitionBase(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, C, u, s, t, o, m, F, i, e, l, d, D, e, f, i, n, i, t, i, o, n, B, a, s, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class VirtualModelCustomFieldDefinitionBaseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelCustomFieldDefinitionBase."""

class VirtualModelDefinitionConcreteModelBase(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, D, e, f, i, n, i, t, i, o, n, C, o, n, c, r, e, t, e, M, o, d, e, l, B, a, s, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class VirtualModelDefinitionConcreteModelBaseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelDefinitionConcreteModelBase."""

class VirtualModelStringCustomFieldDefinition(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, S, t, r, i, n, g, C, u, s, t, o, m, F, i, e, l, d, D, e, f, i, n, i, t, i, o, n, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, r, i, n, g, ", ,, 
):

class VirtualModelStringCustomFieldDefinitionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelStringCustomFieldDefinition."""

class PseudoEmbeddingRpcListLoaded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, L, i, s, t, L, o, a, d, e, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcListLoadedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcListLoaded."""

class EmbeddingRpcGetLoadConfigReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, G, e, t, L, o, a, d, C, o, n, f, i, g, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcGetLoadConfigReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcGetLoadConfigReturns."""

class FilesChannelRetrieveCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class FilesChannelRetrieveCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for FilesChannelRetrieveCreationParameter."""

class PseudoFilesChannelRetrieve(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, F, i, l, e, s, C, h, a, n, n, e, l, R, e, t, r, i, e, v, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoFilesChannelRetrieveDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoFilesChannelRetrieve."""

class PseudoFilesChannelParseDocument(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, F, i, l, e, s, C, h, a, n, n, e, l, P, a, r, s, e, D, o, c, u, m, e, n, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoFilesChannelParseDocumentDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoFilesChannelParseDocument."""

class PseudoFiles(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, F, i, l, e, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoFilesDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoFiles."""

class PseudoLlmRpcListLoaded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, L, i, s, t, L, o, a, d, e, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcListLoadedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcListLoaded."""

class LlmRpcGetLoadConfigReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, G, e, t, L, o, a, d, C, o, n, f, i, g, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcGetLoadConfigReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcGetLoadConfigReturns."""

class PluginsRpcProcessingHandleRequestParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, n, d, l, e, R, e, q, u, e, s, t, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingHandleRequestParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingHandleRequestParameter."""

class RepositoryRpcGetModelDownloadOptionsParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, G, e, t, M, o, d, e, l, D, o, w, n, l, o, a, d, O, p, t, i, o, n, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcGetModelDownloadOptionsParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcGetModelDownloadOptionsParameter."""

class PseudoRepositoryRpcGetModelDownloadOptions(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, R, p, c, G, e, t, M, o, d, e, l, D, o, w, n, l, o, a, d, O, p, t, i, o, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryRpcGetModelDownloadOptionsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryRpcGetModelDownloadOptions."""

class PseudoRepositoryChannelDownloadModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryChannelDownloadModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryChannelDownloadModel."""

class PseudoRepositoryChannelDownloadArtifact(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, D, o, w, n, l, o, a, d, A, r, t, i, f, a, c, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryChannelDownloadArtifactDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryChannelDownloadArtifact."""

class PseudoRepositoryChannelPushArtifact(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, P, u, s, h, A, r, t, i, f, a, c, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryChannelPushArtifactDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryChannelPushArtifact."""

class PseudoRepositoryChannelEnsureAuthenticated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, E, n, s, u, r, e, A, u, t, h, e, n, t, i, c, a, t, e, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryChannelEnsureAuthenticatedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryChannelEnsureAuthenticated."""

class PseudoSystemRpcListDownloadedModels(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, S, y, s, t, e, m, R, p, c, L, i, s, t, D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoSystemRpcListDownloadedModelsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoSystemRpcListDownloadedModels."""

class SystemRpcNotifyParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, y, s, t, e, m, R, p, c, N, o, t, i, f, y, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class SystemRpcNotifyParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for SystemRpcNotifyParameter."""

class PseudoSystemRpcNotify(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, S, y, s, t, e, m, R, p, c, N, o, t, i, f, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoSystemRpcNotifyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoSystemRpcNotify."""

class PseudoSystem(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, S, y, s, t, e, m, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoSystemDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoSystem."""

class UserMessage(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", U, s, e, r, M, e, s, s, a, g, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", r, o, l, e, ", ,,  , t, a, g, =, ", u, s, e, r, ", 
):

class UserMessageDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessageDataUser."""

class SystemPrompt(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", S, y, s, t, e, m, P, r, o, m, p, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", r, o, l, e, ", ,,  , t, a, g, =, ", s, y, s, t, e, m, ", 
):

class SystemPromptDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessageDataSystem."""

class ErrorDisplayDataGenericNoModelMatchingQuery(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, r, r, o, r, D, i, s, p, l, a, y, D, a, t, a, G, e, n, e, r, i, c, N, o, M, o, d, e, l, M, a, t, c, h, i, n, g, Q, u, e, r, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", c, o, d, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, i, c, ., n, o, M, o, d, e, l, M, a, t, c, h, i, n, g, Q, u, e, r, y, ", ,, 
):

class ErrorDisplayDataGenericNoModelMatchingQueryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ErrorDisplayDataGenericNoModelMatchingQuery."""

class Function(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", F, u, n, c, t, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class FunctionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for Function."""

class LlmToolFunction(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, T, o, o, l, F, u, n, c, t, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmToolFunctionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmToolFunction."""

class ModelSpecifierQuery(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, p, e, c, i, f, i, e, r, Q, u, e, r, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", q, u, e, r, y, ", ,, 
):

class ModelSpecifierQueryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSpecifierQuery."""

class DiagnosticsChannelStreamLogsToClientPacketLog(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", D, i, a, g, n, o, s, t, i, c, s, C, h, a, n, n, e, l, S, t, r, e, a, m, L, o, g, s, T, o, C, l, i, e, n, t, P, a, c, k, e, t, L, o, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class DiagnosticsChannelStreamLogsToClientPacketLogDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for DiagnosticsChannelStreamLogsToClientPacketLog."""

class EmbeddingChannelLoadModelToClientPacketResolved(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, R, e, s, o, l, v, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", r, e, s, o, l, v, e, d, ", ,, 
):

class EmbeddingChannelLoadModelToClientPacketResolvedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelLoadModelToClientPacketResolved."""

class EmbeddingChannelLoadModelToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class EmbeddingChannelLoadModelToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelLoadModelToClientPacketSuccess."""

class EmbeddingChannelGetOrLoadToClientPacketAlreadyLoaded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, l, r, e, a, d, y, L, o, a, d, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, l, r, e, a, d, y, L, o, a, d, e, d, ", ,, 
):

class EmbeddingChannelGetOrLoadToClientPacketAlreadyLoadedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadToClientPacketAlreadyLoaded."""

class EmbeddingChannelGetOrLoadToClientPacketStartLoading(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, t, a, r, t, L, o, a, d, i, n, g, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, r, t, L, o, a, d, i, n, g, ", ,, 
):

class EmbeddingChannelGetOrLoadToClientPacketStartLoadingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadToClientPacketStartLoading."""

class EmbeddingChannelGetOrLoadToClientPacketUnloadingOtherJITModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, U, n, l, o, a, d, i, n, g, O, t, h, e, r, J, I, T, M, o, d, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", u, n, l, o, a, d, i, n, g, O, t, h, e, r, J, I, T, M, o, d, e, l, ", ,, 
):

class EmbeddingChannelGetOrLoadToClientPacketUnloadingOtherJITModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadToClientPacketUnloadingOtherJ..."""

class EmbeddingChannelGetOrLoadToClientPacketLoadSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, L, o, a, d, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", l, o, a, d, S, u, c, c, e, s, s, ", ,, 
):

class EmbeddingChannelGetOrLoadToClientPacketLoadSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingChannelGetOrLoadToClientPacketLoadSuccess."""

class LlmChannelLoadModelToClientPacketResolved(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, R, e, s, o, l, v, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", r, e, s, o, l, v, e, d, ", ,, 
):

class LlmChannelLoadModelToClientPacketResolvedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelLoadModelToClientPacketResolved."""

class LlmChannelLoadModelToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class LlmChannelLoadModelToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelLoadModelToClientPacketSuccess."""

class LlmChannelGetOrLoadToClientPacketAlreadyLoaded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, A, l, r, e, a, d, y, L, o, a, d, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, l, r, e, a, d, y, L, o, a, d, e, d, ", ,, 
):

class LlmChannelGetOrLoadToClientPacketAlreadyLoadedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadToClientPacketAlreadyLoaded."""

class LlmChannelGetOrLoadToClientPacketStartLoading(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, t, a, r, t, L, o, a, d, i, n, g, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, r, t, L, o, a, d, i, n, g, ", ,, 
):

class LlmChannelGetOrLoadToClientPacketStartLoadingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadToClientPacketStartLoading."""

class LlmChannelGetOrLoadToClientPacketUnloadingOtherJITModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, U, n, l, o, a, d, i, n, g, O, t, h, e, r, J, I, T, M, o, d, e, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", u, n, l, o, a, d, i, n, g, O, t, h, e, r, J, I, T, M, o, d, e, l, ", ,, 
):

class LlmChannelGetOrLoadToClientPacketUnloadingOtherJITModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadToClientPacketUnloadingOtherJITMode..."""

class LlmChannelGetOrLoadToClientPacketLoadSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, T, o, C, l, i, e, n, t, P, a, c, k, e, t, L, o, a, d, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", l, o, a, d, S, u, c, c, e, s, s, ", ,, 
):

class LlmChannelGetOrLoadToClientPacketLoadSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGetOrLoadToClientPacketLoadSuccess."""

class LlmChannelPredictToClientPacketToolCallGenerationEnd(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, E, n, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, E, n, d, ", ,, 
):

class LlmChannelPredictToClientPacketToolCallGenerationEndDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketToolCallGenerationEnd."""

class LlmChannelPredictToClientPacketSuccess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, T, o, C, l, i, e, n, t, P, a, c, k, e, t, S, u, c, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, u, c, c, e, s, s, ", ,, 
):

class LlmChannelPredictToClientPacketSuccessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictToClientPacketSuccess."""

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationEnd(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, E, n, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, E, n, d, ", ,, 
):

class LlmChannelGenerateWithGeneratorToClientPacketToolCallGenerationEndDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorToClientPacketToolCallG..."""

class PluginsChannelSetPredictionLoopHandlerToClientPacketHandlePredictionLoop(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, e, d, i, c, t, i, o, n, L, o, o, p, H, a, n, d, l, e, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, H, a, n, d, l, e, P, r, e, d, i, c, t, i, o, n, L, o, o, p, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", h, a, n, d, l, e, P, r, e, d, i, c, t, i, o, n, L, o, o, p, ", ,, 
):

class PluginsChannelSetPredictionLoopHandlerToClientPacketHandlePredictionLoopDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for PluginsChannelSetPredictionLoopHandlerToClientPacketHa..."""

class PluginsChannelSetToolsProviderToClientPacketInitSession(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, I, n, i, t, S, e, s, s, i, o, n, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", i, n, i, t, S, e, s, s, i, o, n, ", ,, 
):

class PluginsChannelSetToolsProviderToClientPacketInitSessionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToClientPacketInitSessio..."""

class PluginsChannelSetGeneratorToServerPacketFragmentGenerated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, F, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", f, r, a, g, m, e, n, t, G, e, n, e, r, a, t, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketFragmentGeneratedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketFragmentGenera..."""

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationEnded(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, T, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, E, n, d, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, G, e, n, e, r, a, t, i, o, n, E, n, d, e, d, ", ,, 
):

class PluginsChannelSetGeneratorToServerPacketToolCallGenerationEndedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToServerPacketToolCallGenera..."""

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketPlanUpdated(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, l, a, n, U, p, d, a, t, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, l, a, n, U, p, d, a, t, e, d, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketPlanUpdatedDict(
,  ,  ,  ,  , T, y, p, e, d, D, i, c, t, 
):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToClientPac..."""

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketPlanReady(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, l, a, n, R, e, a, d, y, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, l, a, n, R, e, a, d, y, ", ,, 
):

class RepositoryChannelCreateArtifactDownloadPlanToClientPacketPlanReadyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryChannelCreateArtifactDownloadPlanToClientPac..."""

class ArtifactModelDependency(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, M, o, d, e, l, D, e, p, e, n, d, e, n, c, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", m, o, d, e, l, ", ,, 
):

class ArtifactModelDependencyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactModelDependency."""

class ToolCallRequestData(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, C, a, l, l, R, e, q, u, e, s, t, D, a, t, a, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, C, a, l, l, R, e, q, u, e, s, t, ", ,, 
):

class ToolCallRequestDataDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessagePartToolCallRequestData."""

class EmbeddingLoadModelConfig(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingLoadModelConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingLoadModelConfig."""

class KvConfigFieldDependency(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", K, v, C, o, n, f, i, g, F, i, e, l, d, D, e, p, e, n, d, e, n, c, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class KvConfigFieldDependencyDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for KvConfigFieldDependency."""

class LlmGenInfo(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, G, e, n, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmGenInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmGenInfo."""

class ProcessingRequestResponseConfirmToolCall(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, R, e, q, u, e, s, t, R, e, s, p, o, n, s, e, C, o, n, f, i, r, m, T, o, o, l, C, a, l, l, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, f, i, r, m, T, o, o, l, C, a, l, l, ", ,, 
):

class ProcessingRequestResponseConfirmToolCallDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingRequestResponseConfirmToolCall."""

class ProcessingUpdateContentBlockAttachGenInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, C, o, n, t, e, n, t, B, l, o, c, k, A, t, t, a, c, h, G, e, n, I, n, f, o, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, n, t, e, n, t, B, l, o, c, k, ., a, t, t, a, c, h, G, e, n, I, n, f, o, ", ,, 
):

class ProcessingUpdateContentBlockAttachGenInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateContentBlockAttachGenInfo."""

class ProcessingUpdateStatusCreate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, S, t, a, t, u, s, C, r, e, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, t, u, s, ., c, r, e, a, t, e, ", ,, 
):

class ProcessingUpdateStatusCreateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateStatusCreate."""

class ProcessingUpdateStatusUpdate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, S, t, a, t, u, s, U, p, d, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, t, a, t, u, s, ., u, p, d, a, t, e, ", ,, 
):

class ProcessingUpdateStatusUpdateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateStatusUpdate."""

class ToolStatusStepState(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", T, o, o, l, S, t, a, t, u, s, S, t, e, p, S, t, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ToolStatusStepStateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ToolStatusStepState."""

class ModelSearchResultEntryData(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, S, e, a, r, c, h, R, e, s, u, l, t, E, n, t, r, y, D, a, t, a, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class ModelSearchResultEntryDataDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelSearchResultEntryData."""

class VirtualModelDefinition(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", V, i, r, t, u, a, l, M, o, d, e, l, D, e, f, i, n, i, t, i, o, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class VirtualModelDefinitionDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for VirtualModelDefinition."""

class PseudoDiagnosticsChannelStreamLogs(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, D, i, a, g, n, o, s, t, i, c, s, C, h, a, n, n, e, l, S, t, r, e, a, m, L, o, g, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoDiagnosticsChannelStreamLogsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoDiagnosticsChannelStreamLogs."""

class PseudoDiagnostics(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, D, i, a, g, n, o, s, t, i, c, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoDiagnosticsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoDiagnostics."""

class EmbeddingRpcGetModelInfoParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, G, e, t, M, o, d, e, l, I, n, f, o, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcGetModelInfoParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcGetModelInfoParameter."""

class PseudoEmbeddingRpcGetModelInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, G, e, t, M, o, d, e, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcGetModelInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcGetModelInfo."""

class EmbeddingRpcGetLoadConfigParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, G, e, t, L, o, a, d, C, o, n, f, i, g, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcGetLoadConfigParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcGetLoadConfigParameter."""

class PseudoEmbeddingRpcGetLoadConfig(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, G, e, t, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcGetLoadConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcGetLoadConfig."""

class EmbeddingRpcEmbedStringParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, E, m, b, e, d, S, t, r, i, n, g, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcEmbedStringParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcEmbedStringParameter."""

class PseudoEmbeddingRpcEmbedString(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, E, m, b, e, d, S, t, r, i, n, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcEmbedStringDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcEmbedString."""

class EmbeddingRpcTokenizeParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, T, o, k, e, n, i, z, e, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcTokenizeParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcTokenizeParameter."""

class PseudoEmbeddingRpcTokenize(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, T, o, k, e, n, i, z, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcTokenizeDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcTokenize."""

class EmbeddingRpcCountTokensParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", E, m, b, e, d, d, i, n, g, R, p, c, C, o, u, n, t, T, o, k, e, n, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class EmbeddingRpcCountTokensParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for EmbeddingRpcCountTokensParameter."""

class PseudoEmbeddingRpcCountTokens(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, R, p, c, C, o, u, n, t, T, o, k, e, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingRpcCountTokensDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingRpcCountTokens."""

class PseudoEmbeddingChannelLoadModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingChannelLoadModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingChannelLoadModel."""

class PseudoEmbeddingChannelGetOrLoad(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoEmbeddingChannelGetOrLoadDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbeddingChannelGetOrLoad."""

class PseudoEmbedding(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, E, m, b, e, d, d, i, n, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoEmbeddingDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoEmbedding."""

class LlmRpcGetModelInfoParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, G, e, t, M, o, d, e, l, I, n, f, o, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcGetModelInfoParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcGetModelInfoParameter."""

class PseudoLlmRpcGetModelInfo(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, G, e, t, M, o, d, e, l, I, n, f, o, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcGetModelInfoDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcGetModelInfo."""

class LlmRpcGetLoadConfigParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, G, e, t, L, o, a, d, C, o, n, f, i, g, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcGetLoadConfigParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcGetLoadConfigParameter."""

class PseudoLlmRpcGetLoadConfig(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, G, e, t, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcGetLoadConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcGetLoadConfig."""

class LlmRpcTokenizeParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, T, o, k, e, n, i, z, e, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcTokenizeParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcTokenizeParameter."""

class PseudoLlmRpcTokenize(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, T, o, k, e, n, i, z, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoLlmRpcTokenizeDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcTokenize."""

class LlmRpcCountTokensParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, C, o, u, n, t, T, o, k, e, n, s, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcCountTokensParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcCountTokensParameter."""

class PseudoLlmRpcCountTokens(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, C, o, u, n, t, T, o, k, e, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcCountTokensDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcCountTokens."""

class LlmRpcPreloadDraftModelParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, P, r, e, l, o, a, d, D, r, a, f, t, M, o, d, e, l, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcPreloadDraftModelParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcPreloadDraftModelParameter."""

class PseudoLlmRpcPreloadDraftModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, P, r, e, l, o, a, d, D, r, a, f, t, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcPreloadDraftModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcPreloadDraftModel."""

class PseudoLlmChannelLoadModel(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, C, h, a, n, n, e, l, L, o, a, d, M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmChannelLoadModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmChannelLoadModel."""

class PseudoLlmChannelGetOrLoad(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, C, h, a, n, n, e, l, G, e, t, O, r, L, o, a, d, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmChannelGetOrLoadDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmChannelGetOrLoad."""

class PluginsRpcProcessingHandleRequestReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, n, d, l, e, R, e, q, u, e, s, t, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingHandleRequestReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingHandleRequestReturns."""

class PseudoPluginsRpcProcessingHandleRequest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, n, d, l, e, R, e, q, u, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingHandleRequestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingHandleRequest."""

class PseudoPluginsChannelSetPredictionLoopHandler(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, e, d, i, c, t, i, o, n, L, o, o, p, H, a, n, d, l, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsChannelSetPredictionLoopHandlerDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsChannelSetPredictionLoopHandler."""

class RepositoryRpcSearchModelsReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", R, e, p, o, s, i, t, o, r, y, R, p, c, S, e, a, r, c, h, M, o, d, e, l, s, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class RepositoryRpcSearchModelsReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for RepositoryRpcSearchModelsReturns."""

class PseudoRepositoryRpcSearchModels(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, R, p, c, S, e, a, r, c, h, M, o, d, e, l, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoRepositoryRpcSearchModelsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryRpcSearchModels."""

class PseudoRepositoryChannelCreateArtifactDownloadPlan(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, C, h, a, n, n, e, l, C, r, e, a, t, e, A, r, t, i, f, a, c, t, D, o, w, n, l, o, a, d, P, l, a, n, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class PseudoRepositoryChannelCreateArtifactDownloadPlanDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepositoryChannelCreateArtifactDownloadPlan."""

class PseudoRepository(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, R, e, p, o, s, i, t, o, r, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoRepositoryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoRepository."""

class AssistantResponse(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, s, s, i, s, t, a, n, t, R, e, s, p, o, n, s, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", r, o, l, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", a, s, s, i, s, t, a, n, t, ", ,, 
):

class AssistantResponseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatMessageDataAssistant."""

class LlmToolUseSettingToolArray(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, T, o, o, l, U, s, e, S, e, t, t, i, n, g, T, o, o, l, A, r, r, a, y, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, A, r, r, a, y, ", ,, 
):

class LlmToolUseSettingToolArrayDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmToolUseSettingToolArray."""

class PluginsChannelSetToolsProviderToServerPacketSessionInitialized(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, S, e, s, s, i, o, n, I, n, i, t, i, a, l, i, z, e, d, D, i, c, t, ", 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", s, e, s, s, i, o, n, I, n, i, t, i, a, l, i, z, e, d, ", ,, 
):

class PluginsChannelSetToolsProviderToServerPacketSessionInitializedDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetToolsProviderToServerPacketSessionIni..."""

class ArtifactManifestBase(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", A, r, t, i, f, a, c, t, M, a, n, i, f, e, s, t, B, a, s, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ArtifactManifestBaseDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ArtifactManifestBase."""

class LlmApplyPromptTemplateOpts(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, A, p, p, l, y, P, r, o, m, p, t, T, e, m, p, l, a, t, e, O, p, t, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmApplyPromptTemplateOptsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmApplyPromptTemplateOpts."""

class ProcessingUpdateToolStatusCreate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, T, o, o, l, S, t, a, t, u, s, C, r, e, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, S, t, a, t, u, s, ., c, r, e, a, t, e, ", ,, 
):

class ProcessingUpdateToolStatusCreateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateToolStatusCreate."""

class ProcessingUpdateToolStatusUpdate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, o, c, e, s, s, i, n, g, U, p, d, a, t, e, T, o, o, l, S, t, a, t, u, s, U, p, d, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", t, o, o, l, S, t, a, t, u, s, ., u, p, d, a, t, e, ", ,, 
):

class ProcessingUpdateToolStatusUpdateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ProcessingUpdateToolStatusUpdate."""

class PseudoPluginsChannelSetToolsProvider(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, T, o, o, l, s, P, r, o, v, i, d, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsChannelSetToolsProviderDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsChannelSetToolsProvider."""

class PluginsChannelSetPromptPreprocessorToClientPacketPreprocess(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, o, m, p, t, P, r, e, p, r, o, c, e, s, s, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, P, r, e, p, r, o, c, e, s, s, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", p, r, e, p, r, o, c, e, s, s, ", ,, 
):

class PluginsChannelSetPromptPreprocessorToClientPacketPreprocessDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToClientPacketPrepr..."""

class PluginsChannelSetPromptPreprocessorToServerPacketComplete(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, o, m, p, t, P, r, e, p, r, o, c, e, s, s, o, r, T, o, S, e, r, v, e, r, P, a, c, k, e, t, C, o, m, p, l, e, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", c, o, m, p, l, e, t, e, ", ,, 
):

class PluginsChannelSetPromptPreprocessorToServerPacketCompleteDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetPromptPreprocessorToServerPacketCompl..."""

class ChatHistoryData(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", C, h, a, t, H, i, s, t, o, r, y, D, a, t, a, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ChatHistoryDataDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ChatHistoryData."""

class LlmPredictionConfigInput(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, P, r, e, d, i, c, t, i, o, n, C, o, n, f, i, g, I, n, p, u, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmPredictionConfigInputDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmPredictionConfigInput."""

class LlmPredictionConfig(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, P, r, e, d, i, c, t, i, o, n, C, o, n, f, i, g, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class LlmPredictionConfigDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmPredictionConfig."""

class ModelManifest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, M, a, n, i, f, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", m, o, d, e, l, ", 
):

class ModelManifestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for ModelManifest."""

class PluginManifest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, M, a, n, i, f, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", p, l, u, g, i, n, ", 
):

class PluginManifestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginManifest."""

class PresetManifest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, e, s, e, t, M, a, n, i, f, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, ,,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,,  , t, a, g, =, ", p, r, e, s, e, t, ", 
):

class PresetManifestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PresetManifest."""

class LlmRpcApplyPromptTemplateParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, R, p, c, A, p, p, l, y, P, r, o, m, p, t, T, e, m, p, l, a, t, e, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmRpcApplyPromptTemplateParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmRpcApplyPromptTemplateParameter."""

class PseudoLlmRpcApplyPromptTemplate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, R, p, c, A, p, p, l, y, P, r, o, m, p, t, T, e, m, p, l, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmRpcApplyPromptTemplateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmRpcApplyPromptTemplate."""

class PredictionChannelRequest(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, r, e, d, i, c, t, i, o, n, C, h, a, n, n, e, l, R, e, q, u, e, s, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PredictionChannelRequestDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelPredictCreationParameter."""

class PseudoLlmChannelPredict(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, C, h, a, n, n, e, l, P, r, e, d, i, c, t, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmChannelPredictDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmChannelPredict."""

class LlmChannelGenerateWithGeneratorCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class LlmChannelGenerateWithGeneratorCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for LlmChannelGenerateWithGeneratorCreationParameter."""

class PseudoLlmChannelGenerateWithGenerator(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, C, h, a, n, n, e, l, G, e, n, e, r, a, t, e, W, i, t, h, G, e, n, e, r, a, t, o, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoLlmChannelGenerateWithGeneratorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlmChannelGenerateWithGenerator."""

class PseudoLlm(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, L, l, m, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoLlmDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoLlm."""

class PluginsRpcProcessingHandleUpdateParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, n, d, l, e, U, p, d, a, t, e, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingHandleUpdateParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingHandleUpdateParameter."""

class PseudoPluginsRpcProcessingHandleUpdate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, H, a, n, d, l, e, U, p, d, a, t, e, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingHandleUpdateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingHandleUpdate."""

class PluginsRpcProcessingPullHistoryReturns(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, P, u, l, l, H, i, s, t, o, r, y, R, e, t, u, r, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PluginsRpcProcessingPullHistoryReturnsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsRpcProcessingPullHistoryReturns."""

class PseudoPluginsRpcProcessingPullHistory(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, R, p, c, P, r, o, c, e, s, s, i, n, g, P, u, l, l, H, i, s, t, o, r, y, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsRpcProcessingPullHistoryDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsRpcProcessingPullHistory."""

class PluginsChannelRegisterDevelopmentPluginCreationParameter(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, R, e, g, i, s, t, e, r, D, e, v, e, l, o, p, m, e, n, t, P, l, u, g, i, n, C, r, e, a, t, i, o, n, P, a, r, a, m, e, t, e, r, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
):

class PluginsChannelRegisterDevelopmentPluginCreationParameterDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelRegisterDevelopmentPluginCreationParamet..."""

class PseudoPluginsChannelRegisterDevelopmentPlugin(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, C, h, a, n, n, e, l, R, e, g, i, s, t, e, r, D, e, v, e, l, o, p, m, e, n, t, P, l, u, g, i, n, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsChannelRegisterDevelopmentPluginDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsChannelRegisterDevelopmentPlugin."""

class PseudoPluginsChannelSetPromptPreprocessor(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, P, r, o, m, p, t, P, r, e, p, r, o, c, e, s, s, o, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsChannelSetPromptPreprocessorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsChannelSetPromptPreprocessor."""

class PluginsChannelSetGeneratorToClientPacketGenerate(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, T, o, C, l, i, e, n, t, P, a, c, k, e, t, G, e, n, e, r, a, t, e, D, i, c, t, ", ], ,, 
,  ,  ,  ,  , k, w, _, o, n, l, y, =, T, r, u, e, ,, 
,  ,  ,  ,  , t, a, g, _, f, i, e, l, d, =, ", t, y, p, e, ", ,, 
,  ,  ,  ,  , t, a, g, =, ", g, e, n, e, r, a, t, e, ", ,, 
):

class PluginsChannelSetGeneratorToClientPacketGenerateDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PluginsChannelSetGeneratorToClientPacketGenerate."""

class PseudoPluginsChannelSetGenerator(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, C, h, a, n, n, e, l, S, e, t, G, e, n, e, r, a, t, o, r, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e, 
):

class PseudoPluginsChannelSetGeneratorDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPluginsChannelSetGenerator."""

class PseudoPlugins(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", P, s, e, u, d, o, P, l, u, g, i, n, s, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class PseudoPluginsDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for PseudoPlugins."""

class Model(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, ", M, o, d, e, l, D, i, c, t, ", ], ,,  , k, w, _, o, n, l, y, =, T, r, u, e):

class ModelDict(T, y, p, e, d, D, i, c, t):
    """Corresponding typed dictionary definition for Model."""


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/_ws_impl.py
# Language: python

import asyncio
import threading
import weakref
from concurrent.futures import Future as SyncFuture
from contextlib import (
    AsyncExitStack,
)
from typing import (
    Any,
    Awaitable,
    Coroutine,
    Callable,
    TypeVar,
)
from anyio import create_task_group, move_on_after
from httpx_ws import aconnect_ws, AsyncWebSocketSession, HTTPXWSException
from .schemas import DictObject
from .json_api import LMStudioWebsocket, LMStudioWebsocketError
from ._logging import new_logger, LogEventContext

class AsyncTaskManager:
    def __init__((self, *, on_activation: Callable[[], Any] | None)) -> None:
    def check_running_in_task_loop((self, *, allow_inactive: bool = False)) -> bool:
        """Returns if running in this manager's event loop, raises RuntimeError otherwise."""
    def request_termination((self)) -> bool:
        """Request termination of the task manager from the same thread."""
    def request_termination_threadsafe((self)) -> SyncFuture[bool]:
        """Request termination of the task manager from any thread."""
    def wait_for_termination((self)) -> None:
        """Wait in the same thread for the task manager to indicate it has terminated."""
    def wait_for_termination_threadsafe((self)) -> None:
        """Wait in any thread for the task manager to indicate it has terminated."""
    def terminate((self)) -> None:
        """Terminate the task manager from the same thread."""
    def terminate_threadsafe((self)) -> None:
        """Terminate the task manager from any thread."""
    def _init_event_loop((self)) -> None:
    def run_until_terminated((
        self, func: Callable[[], Coroutine[Any, Any, Any]] | None = None
    )) -> None:
        """Run task manager until termination is requested."""
    def _accept_queued_tasks((self)) -> None:
    def schedule_task((self, func: Callable[[], Awaitable[Any]])) -> None:
        """Schedule given task in the task manager's base coroutine from the same thread."""
    def schedule_task_threadsafe((self, func: Callable[[], Awaitable[Any]])) -> None:
        """Schedule given task in the task manager's base coroutine from any thread."""
    def run_coroutine_threadsafe((self, coro: Coroutine[Any, Any, T])) -> SyncFuture[T]:
        """Call given coroutine in the task manager's event loop from any thread."""
    def call_soon_threadsafe((self, func: Callable[[], Any])) -> asyncio.Handle:
        """Call given non-blocking function in the background event loop."""

class BackgroundThread(t, h, r, e, a, d, i, n, g, ., T, h, r, e, a, d):
    """Background async event loop thread."""
    def __init__((
        self,
        task_target: Callable[[], Coroutine[Any, Any, Any]] | None = None,
        name: str | None = None,
    )) -> None:
    def start((self, wait_for_loop: bool = True)) -> None:
        """Start background thread and (optionally) wait for the event loop to be ready."""
    def run((self)) -> None:
        """Run an async event loop in the background thread."""
    def wait_for_loop((self)) -> asyncio.AbstractEventLoop | None:
        """Wait for the event loop to start from a synchronous foreground thread."""
    def wait_for_loop_async((self)) -> asyncio.AbstractEventLoop | None:
        """Wait for the event loop to start from an asynchronous foreground thread."""
    def terminate((self)) -> bool:
        """Request termination of the event loop from a synchronous foreground thread."""
    def terminate_async((self)) -> bool:
        """Request termination of the event loop from an asynchronous foreground thread."""
    def schedule_background_task((self, func: Callable[[], Any])) -> None:
        """Schedule given task in the event loop from a synchronous foreground thread."""
    def schedule_background_task_async((self, func: Callable[[], Any])) -> None:
        """Schedule given task in the event loop from an asynchronous foreground thread."""
    def run_background_coroutine((self, coro: Coroutine[Any, Any, T])) -> T:
        """Run given coroutine in the event loop and wait for the result."""
    def run_background_coroutine_async((self, coro: Coroutine[Any, Any, T])) -> T:
        """Run given coroutine in the event loop and await the result."""
    def call_in_background((self, func: Callable[[], Any])) -> None:
        """Call given non-blocking function in the background event loop."""

class AsyncWebsocketThread(B, a, c, k, g, r, o, u, n, d, T, h, r, e, a, d):
    def __init__((self, log_context: LogEventContext | None = None)) -> None:
    def _log_thread_execution((self)) -> None:

class AsyncWebsocketHandler:
    """Async task handler for a single websocket connection."""
    def __init__((
        self,
        task_manager: AsyncTaskManager,
        ws_url: str,
        auth_details: DictObject,
        enqueue_message: Callable[[DictObject | None], Awaitable[bool]],
        log_context: LogEventContext | None = None,
    )) -> None:
    def connect((self)) -> bool:
        """Connect websocket from the task manager's event loop."""
    def connect_threadsafe((self)) -> bool:
        """Connect websocket from any thread."""
    def disconnect((self)) -> None:
        """Disconnect websocket from the task manager's event loop."""
    def disconnect_threadsafe((self)) -> None:
        """Disconnect websocket from any thread."""
    def _logged_ws_handler((self)) -> None:
    def _handle_ws((self)) -> None:
    def send_json((self, message: DictObject)) -> None:
    def send_json_threadsafe((self, message: DictObject)) -> None:
    def _receive_json((self)) -> Any:
    def _authenticate((self)) -> bool:
    def _process_next_message((self)) -> bool:
        """Process the next message received on the websocket."""
    def _receive_messages((self)) -> None:
        """Process received messages until task is cancelled."""

class SyncToAsyncWebsocketBridge:
    def __init__((
        self,
        ws_thread: AsyncWebsocketThread,
        ws_url: str,
        auth_details: DictObject,
        enqueue_message: Callable[[DictObject | None], bool],
        log_context: LogEventContext,
    )) -> None:
    def connect((self)) -> bool:
    def disconnect((self)) -> None:
    def send_json((self, message: DictObject)) -> None:

def __init__((self, *, on_activation: Callable[[], Any] | None)) -> None:

def activated((self)) -> bool:

def active((self)) -> bool:

def check_running_in_task_loop((self, *, allow_inactive: bool = False)) -> bool:
    """Returns if running in this manager's event loop, raises RuntimeError otherwise."""

def request_termination((self)) -> bool:
    """Request termination of the task manager from the same thread."""

def request_termination_threadsafe((self)) -> SyncFuture[bool]:
    """Request termination of the task manager from any thread."""

def wait_for_termination((self)) -> None:
    """Wait in the same thread for the task manager to indicate it has terminated."""

def wait_for_termination_threadsafe((self)) -> None:
    """Wait in any thread for the task manager to indicate it has terminated."""

def terminate((self)) -> None:
    """Terminate the task manager from the same thread."""

def terminate_threadsafe((self)) -> None:
    """Terminate the task manager from any thread."""

def _init_event_loop((self)) -> None:

def run_until_terminated((
        self, func: Callable[[], Coroutine[Any, Any, Any]] | None = None
    )) -> None:
    """Run task manager until termination is requested."""

def _accept_queued_tasks((self)) -> None:

def schedule_task((self, func: Callable[[], Awaitable[Any]])) -> None:
    """Schedule given task in the task manager's base coroutine from the same thread."""

def schedule_task_threadsafe((self, func: Callable[[], Awaitable[Any]])) -> None:
    """Schedule given task in the task manager's base coroutine from any thread."""

def run_coroutine_threadsafe((self, coro: Coroutine[Any, Any, T])) -> SyncFuture[T]:
    """Call given coroutine in the task manager's event loop from any thread."""

def call_soon_threadsafe((self, func: Callable[[], Any])) -> asyncio.Handle:
    """Call given non-blocking function in the background event loop."""

def __init__((
        self,
        task_target: Callable[[], Coroutine[Any, Any, Any]] | None = None,
        name: str | None = None,
    )) -> None:

def task_manager((self)) -> AsyncTaskManager:

def start((self, wait_for_loop: bool = True)) -> None:
    """Start background thread and (optionally) wait for the event loop to be ready."""

def run((self)) -> None:
    """Run an async event loop in the background thread."""

def wait_for_loop((self)) -> asyncio.AbstractEventLoop | None:
    """Wait for the event loop to start from a synchronous foreground thread."""

def wait_for_loop_async((self)) -> asyncio.AbstractEventLoop | None:
    """Wait for the event loop to start from an asynchronous foreground thread."""

def terminate((self)) -> bool:
    """Request termination of the event loop from a synchronous foreground thread."""

def terminate_async((self)) -> bool:
    """Request termination of the event loop from an asynchronous foreground thread."""

def schedule_background_task((self, func: Callable[[], Any])) -> None:
    """Schedule given task in the event loop from a synchronous foreground thread."""

def schedule_background_task_async((self, func: Callable[[], Any])) -> None:
    """Schedule given task in the event loop from an asynchronous foreground thread."""

def run_background_coroutine((self, coro: Coroutine[Any, Any, T])) -> T:
    """Run given coroutine in the event loop and wait for the result."""

def run_background_coroutine_async((self, coro: Coroutine[Any, Any, T])) -> T:
    """Run given coroutine in the event loop and await the result."""

def call_in_background((self, func: Callable[[], Any])) -> None:
    """Call given non-blocking function in the background event loop."""

def __init__((self, log_context: LogEventContext | None = None)) -> None:

def _log_thread_execution((self)) -> None:

def __init__((
        self,
        task_manager: AsyncTaskManager,
        ws_url: str,
        auth_details: DictObject,
        enqueue_message: Callable[[DictObject | None], Awaitable[bool]],
        log_context: LogEventContext | None = None,
    )) -> None:

def connect((self)) -> bool:
    """Connect websocket from the task manager's event loop."""

def connect_threadsafe((self)) -> bool:
    """Connect websocket from any thread."""

def disconnect((self)) -> None:
    """Disconnect websocket from the task manager's event loop."""

def disconnect_threadsafe((self)) -> None:
    """Disconnect websocket from any thread."""

def _logged_ws_handler((self)) -> None:

def _handle_ws((self)) -> None:

def _clear_task_state(()) -> None:

def send_json((self, message: DictObject)) -> None:

def send_json_threadsafe((self, message: DictObject)) -> None:

def _receive_json((self)) -> Any:

def _authenticate((self)) -> bool:

def _process_next_message((self)) -> bool:
    """Process the next message received on the websocket."""

def _receive_messages((self)) -> None:
    """Process received messages until task is cancelled."""

def __init__((
        self,
        ws_thread: AsyncWebsocketThread,
        ws_url: str,
        auth_details: DictObject,
        enqueue_message: Callable[[DictObject | None], bool],
        log_context: LogEventContext,
    )) -> None:

def enqueue_async((message: DictObject | None)) -> bool:

def connect((self)) -> bool:

def disconnect((self)) -> None:

def send_json((self, message: DictObject)) -> None:

def _ws((self)) -> AsyncWebSocketSession | None:

def _connection_failure((self)) -> Exception | None:

def _auth_failure((self)) -> Any | None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/async_api.py
# Language: python

import asyncio
import warnings
from abc import abstractmethod
from contextlib import AsyncExitStack, asynccontextmanager
from types import TracebackType
from typing import (
    Any,
    AsyncContextManager,
    AsyncGenerator,
    AsyncIterator,
    Awaitable,
    Callable,
    Generic,
    Iterable,
    Sequence,
    Type,
    TypeAlias,
    TypeVar,
)
from typing_extensions import (
    # Native in 3.11+
    Self,
    # Native in 3.13+
    TypeIs,
)
from anyio import create_task_group
from anyio.abc import TaskGroup
from httpx import RequestError, HTTPStatusError
from httpx_ws import aconnect_ws, AsyncWebSocketSession, HTTPXWSException
from .sdk_api import LMStudioRuntimeError, sdk_public_api, sdk_public_api_async
from .schemas import AnyLMStudioStruct, DictObject
from .history import (
    Chat,
    ChatHistoryDataDict,
    FileHandle,
    LocalFileInput,
    _LocalFileData,
)
from .json_api import (
    AnyLoadConfig,
    AnyModelSpecifier,
    AvailableModelBase,
    ChannelEndpoint,
    ChannelHandler,
    ChatResponseEndpoint,
    ClientBase,
    ClientSession,
    CompletionEndpoint,
    DEFAULT_TTL,
    DownloadedModelBase,
    DownloadFinalizedCallback,
    DownloadProgressCallback,
    EmbeddingLoadModelConfig,
    EmbeddingLoadModelConfigDict,
    EmbeddingModelInfo,
    GetOrLoadEndpoint,
    LlmInfo,
    LlmLoadModelConfig,
    LlmLoadModelConfigDict,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmPredictionFragment,
    LMStudioCancelledError,
    LMStudioClientError,
    LMStudioWebsocket,
    LMStudioWebsocketError,
    LoadModelEndpoint,
    ModelDownloadOptionBase,
    ModelHandleBase,
    ModelInstanceInfo,
    ModelLoadingCallback,
    ModelSessionTypes,
    ModelTypesEmbedding,
    ModelTypesLlm,
    PredictionStreamBase,
    PredictionEndpoint,
    PredictionFirstTokenCallback,
    PredictionFragmentCallback,
    PredictionFragmentEvent,
    PredictionMessageCallback,
    PredictionResult,
    PromptProcessingCallback,
    RemoteCallHandler,
    ResponseSchema,
    TModelInfo,
    check_model_namespace,
    load_struct,
    _model_spec_to_api_dict,
    _redact_json,
)
from ._kv_config import TLoadConfig, TLoadConfigDict, parse_server_config
from ._sdk_models import (
    EmbeddingRpcCountTokensParameter,
    EmbeddingRpcEmbedStringParameter,
    EmbeddingRpcTokenizeParameter,
    LlmApplyPromptTemplateOpts,
    LlmApplyPromptTemplateOptsDict,
    LlmRpcApplyPromptTemplateParameter,
    ModelCompatibilityType,
)
from ._logging import new_logger, LogEventContext

class AsyncChannel(G, e, n, e, r, i, c, [, T, ]):
    """Communication subchannel over multiplexed async websocket."""
    def __init__((
        self,
        channel_id: int,
        rx_queue: asyncio.Queue[Any],
        endpoint: ChannelEndpoint[T, Any, Any],
        send_json: Callable[[DictObject], Awaitable[None]],
        log_context: LogEventContext,
    )) -> None:
        """Initialize asynchronous websocket streaming channel."""
    def get_creation_message((self)) -> DictObject:
        """Get the message to send to create this channel."""
    def cancel((self)) -> None:
        """Cancel the channel."""
    def rx_stream((
        self,
    )) -> AsyncIterator[DictObject | None]:
        """Stream received channel messages until channel is closed by server."""
    def wait_for_result((self)) -> T:
        """Wait for the channel to finish and return the result."""

class AsyncRemoteCall:
    """Remote procedure call over multiplexed async websocket."""
    def __init__((
        self,
        call_id: int,
        rx_queue: asyncio.Queue[Any],
        log_context: LogEventContext,
        notice_prefix: str = "RPC",
    )) -> None:
        """Initialize asynchronous remote procedure call."""
    def get_rpc_message((
        self, endpoint: str, params: AnyLMStudioStruct | None
    )) -> DictObject:
        """Get the message to send to initiate this remote procedure call."""
    def receive_result((self)) -> Any:
        """Receive call response on the receive queue."""

class AsyncLMStudioWebsocket(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, W, e, b, s, o, c, k, e, t, [, A, s, y, n, c, W, e, b, S, o, c, k, e, t, S, e, s, s, i, o, n, ,,  , a, s, y, n, c, i, o, ., Q, u, e, u, e, [, A, n, y, ], ], 
):
    """Asynchronous websocket client that handles demultiplexing of reply messages."""
    def __init__((
        self,
        ws_url: str,
        auth_details: DictObject,
        log_context: LogEventContext | None = None,
    )) -> None:
        """Initialize asynchronous websocket client."""
    def __aenter__((self)) -> Self:
    def __aexit__((self, *args: Any)) -> None:
    def _send_json((self, message: DictObject)) -> None:
    def _receive_json((self)) -> Any:
    def connect((self)) -> Self:
        """Connect to and authenticate with the LM Studio API."""
    def disconnect((self)) -> None:
        """Drop the LM Studio API connection."""
    def _cancel_on_termination((self, tg: TaskGroup)) -> None:
    def _process_next_message((self)) -> bool:
        """Process the next message received on the websocket."""
    def _receive_messages((self)) -> None:
        """Process received messages until connection is terminated."""
    def _notify_client_termination((self)) -> int:
        """Send None to all clients with open receive queues."""
    def _connect_to_endpoint((self, channel: AsyncChannel[Any])) -> None:
        """Connect channel to specified endpoint."""
    def _send_call((
        self,
        rpc: AsyncRemoteCall,
        endpoint: str,
        params: AnyLMStudioStruct | None = None,
    )) -> None:
        """Initiate remote call to specified endpoint."""
    def remote_call((
        self,
        endpoint: str,
        params: AnyLMStudioStruct | None,
        notice_prefix: str = "RPC",
    )) -> Any:
        """Make a remote procedure call over the websocket."""

class AsyncSession(C, l, i, e, n, t, S, e, s, s, i, o, n, [, ", A, s, y, n, c, C, l, i, e, n, t, ", ,,  , A, s, y, n, c, L, M, S, t, u, d, i, o, W, e, b, s, o, c, k, e, t, ]):
    """Async client session interfaces applicable to all API namespaces."""
    def __init__((self, client: "AsyncClient")) -> None:
        """Initialize asynchronous API client session."""
    def _ensure_connected((self)) -> None:
    def __aenter__((self)) -> Self:
    def __aexit__((self, *args: Any)) -> None:

class AsyncDownloadedModel(
,  ,  ,  ,  , G, e, n, e, r, i, c, [, 
,  ,  ,  ,  ,  ,  ,  ,  , T, M, o, d, e, l, I, n, f, o, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, A, s, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, L, o, a, d, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, A, s, y, n, c, M, o, d, e, l, H, a, n, d, l, e, ,, 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, B, a, s, e, [, T, M, o, d, e, l, I, n, f, o, ,,  , T, A, s, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ], ,, 
):

class AsyncDownloadedEmbeddingModel(
,  ,  ,  ,  , A, s, y, n, c, D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, M, o, d, e, l, I, n, f, o, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", A, s, y, n, c, S, e, s, s, i, o, n, E, m, b, e, d, d, i, n, g, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", A, s, y, n, c, E, m, b, e, d, d, i, n, g, M, o, d, e, l, ", ,, 
,  ,  ,  ,  , ], ,, 
):
    """Asynchronous download listing for an embedding model."""
    def __init__((
        self, model_info: DictObject, session: "AsyncSessionEmbedding"
    )) -> None:
        """Initialize downloaded embedding model details."""

class AsyncDownloadedLlm(
,  ,  ,  ,  , A, s, y, n, c, D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, I, n, f, o, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", A, s, y, n, c, S, e, s, s, i, o, n, L, l, m, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", A, s, y, n, c, L, L, M, ", ,, 
,  ,  ,  ,  , ], 
):
    """Asynchronous ownload listing for an LLM."""
    def __init__((self, model_info: DictObject, session: "AsyncSessionLlm")) -> None:
        """Initialize downloaded embedding model details."""

class AsyncSessionSystem(A, s, y, n, c, S, e, s, s, i, o, n):
    """Async client session for the system namespace."""
    def _process_download_listing((
        self, model_info: DictObject
    )) -> AnyAsyncDownloadedModel:

class _AsyncSessionFiles(A, s, y, n, c, S, e, s, s, i, o, n):
    """Async client session for the files namespace."""
    def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:
    def _prepare_file((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:
        """Add a file to the server. Returns a file handle for use in prediction requests."""

class AsyncModelDownloadOption(M, o, d, e, l, D, o, w, n, l, o, a, d, O, p, t, i, o, n, B, a, s, e, [, A, s, y, n, c, S, e, s, s, i, o, n, ]):
    """A single download option for a model search result."""

class AsyncAvailableModel(A, v, a, i, l, a, b, l, e, M, o, d, e, l, B, a, s, e, [, A, s, y, n, c, S, e, s, s, i, o, n, ]):
    """A model available for download from the model repository."""

class AsyncSessionRepository(A, s, y, n, c, S, e, s, s, i, o, n):
    """Async client session for the repository namespace."""

class AsyncSessionModel(
,  ,  ,  ,  , A, s, y, n, c, S, e, s, s, i, o, n, ,, 
,  ,  ,  ,  , G, e, n, e, r, i, c, [, 
,  ,  ,  ,  ,  ,  ,  ,  , T, A, s, y, n, c, M, o, d, e, l, H, a, n, d, l, e, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, L, o, a, d, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, A, s, y, n, c, D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, ,, 
,  ,  ,  ,  , ], ,, 
):
    """Async client session for a model (LLM/embedding) namespace."""
    def _get_load_config((
        self, model_specifier: AnyModelSpecifier
    )) -> AnyLoadConfig:
        """Get the model load config for the specified model."""
    def _get_api_model_info((self, model_specifier: AnyModelSpecifier)) -> Any:
        """Get the raw model info (if any) for a model matching the given criteria."""
    def _get_context_length((self, model_specifier: AnyModelSpecifier)) -> int:
        """Get the context length of the specified model."""
    def _count_tokens((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> int:
    def _tokenize_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[int]:
    def _tokenize((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[int] | Sequence[Sequence[int]]:
        """Tokenize the input string(s) using the specified model."""
    def _load_new_instance((
        self,
        model_key: str,
        instance_identifier: str | None,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TAsyncModelHandle:
    def _get_or_load((
        self,
        model_key: str,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TAsyncModelHandle:
        """Load the specified model with the given identifier and configuration."""
    def _get_any((self)) -> TAsyncModelHandle:
        """Get a handle to any loaded model."""
    def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:

class AsyncPredictionStream(P, r, e, d, i, c, t, i, o, n, S, t, r, e, a, m, B, a, s, e):
    """Async context manager for an ongoing prediction process."""
    def __init__((
        self,
        channel_cm: AsyncPredictionCM,
        endpoint: PredictionEndpoint,
    )) -> None:
        """Initialize a prediction process representation."""
    def __aenter__((self)) -> Self:
    def __aexit__((
        self,
        _exc_type: Type[BaseException] | None,
        exc_val: BaseException | None,
        _exc_tb: TracebackType | None,
    )) -> None:
    def __aiter__((self)) -> AsyncIterator[LlmPredictionFragment]:

class AsyncSessionLlm(
,  ,  ,  ,  , A, s, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", A, s, y, n, c, L, L, M, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , A, s, y, n, c, D, o, w, n, l, o, a, d, e, d, L, l, m, ,, 
,  ,  ,  ,  , ], 
):
    """Async client session for LLM namespace."""
    def __init__((self, client: "AsyncClient")) -> None:
        """Initialize API client session for LLM interaction."""
    def _create_handle((self, model_identifier: str)) -> "AsyncLLM":
        """Create a symbolic handle to the specified LLM model."""
    def _complete_stream((
        self,
        model_specifier: AnyModelSpecifier,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> AsyncPredictionStream:
        """Request a one-off prediction without any context and stream the generated tokens."""
    def _respond_stream((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        on_message: PredictionMessageCallback | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> AsyncPredictionStream:
        """Request a response in an ongoing assistant chat session and stream the generated tokens."""
    def _apply_prompt_template((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        opts: LlmApplyPromptTemplateOpts | LlmApplyPromptTemplateOptsDict = {},
    )) -> str:
        """Apply a prompt template to the given history."""

class AsyncSessionEmbedding(
,  ,  ,  ,  , A, s, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", A, s, y, n, c, E, m, b, e, d, d, i, n, g, M, o, d, e, l, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , A, s, y, n, c, D, o, w, n, l, o, a, d, e, d, E, m, b, e, d, d, i, n, g, M, o, d, e, l, ,, 
,  ,  ,  ,  , ], 
):
    """Async client session for embedding namespace."""
    def __init__((self, client: "AsyncClient")) -> None:
        """Initialize API client session for embedding model interaction."""
    def _create_handle((self, model_identifier: str)) -> "AsyncEmbeddingModel":
        """Create a symbolic handle to the specified embedding model."""
    def _embed_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[float]:
    def _embed((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[float] | Sequence[Sequence[float]]:
        """Request embedding vectors for the given input string(s)."""

class AsyncModelHandle(
,  ,  ,  ,  , G, e, n, e, r, i, c, [, T, A, s, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ], ,,  , M, o, d, e, l, H, a, n, d, l, e, B, a, s, e, [, T, A, s, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ], 
):
    """Reference to a loaded LM Studio model."""

class AsyncLLM(A, s, y, n, c, M, o, d, e, l, H, a, n, d, l, e, [, A, s, y, n, c, S, e, s, s, i, o, n, L, l, m, ]):
    """Reference to a loaded LLM model."""

class AsyncEmbeddingModel(A, s, y, n, c, M, o, d, e, l, H, a, n, d, l, e, [, A, s, y, n, c, S, e, s, s, i, o, n, E, m, b, e, d, d, i, n, g, ]):
    """Reference to a loaded embedding model."""

class AsyncClient(C, l, i, e, n, t, B, a, s, e):
    """Async SDK client interface."""
    def __init__((self, api_host: str | None = None)) -> None:
        """Initialize API client."""
    def __aenter__((self)) -> Self:
    def __aexit__((self, *args: Any)) -> None:
    def aclose((self)) -> None:
        """Close any started client sessions."""
    def _get_session((self, cls: Type[TAsyncSession])) -> TAsyncSession:
        """Get the client session of the given type."""
    def _prepare_file((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:
        """Add a file to the server. Returns a file handle for use in prediction requests."""

def __init__((
        self,
        channel_id: int,
        rx_queue: asyncio.Queue[Any],
        endpoint: ChannelEndpoint[T, Any, Any],
        send_json: Callable[[DictObject], Awaitable[None]],
        log_context: LogEventContext,
    )) -> None:
    """Initialize asynchronous websocket streaming channel."""

def get_creation_message((self)) -> DictObject:
    """Get the message to send to create this channel."""

def cancel((self)) -> None:
    """Cancel the channel."""

def rx_stream((
        self,
    )) -> AsyncIterator[DictObject | None]:
    """Stream received channel messages until channel is closed by server."""

def wait_for_result((self)) -> T:
    """Wait for the channel to finish and return the result."""

def __init__((
        self,
        call_id: int,
        rx_queue: asyncio.Queue[Any],
        log_context: LogEventContext,
        notice_prefix: str = "RPC",
    )) -> None:
    """Initialize asynchronous remote procedure call."""

def get_rpc_message((
        self, endpoint: str, params: AnyLMStudioStruct | None
    )) -> DictObject:
    """Get the message to send to initiate this remote procedure call."""

def receive_result((self)) -> Any:
    """Receive call response on the receive queue."""

def __init__((
        self,
        ws_url: str,
        auth_details: DictObject,
        log_context: LogEventContext | None = None,
    )) -> None:
    """Initialize asynchronous websocket client."""

def _httpx_ws((self)) -> AsyncWebSocketSession | None:

def __aenter__((self)) -> Self:

def __aexit__((self, *args: Any)) -> None:

def _send_json((self, message: DictObject)) -> None:

def _receive_json((self)) -> Any:

def connect((self)) -> Self:
    """Connect to and authenticate with the LM Studio API."""

def _terminate_rx_task(()) -> None:

def disconnect((self)) -> None:
    """Drop the LM Studio API connection."""

def _cancel_on_termination((self, tg: TaskGroup)) -> None:

def _process_next_message((self)) -> bool:
    """Process the next message received on the websocket."""

def _receive_messages((self)) -> None:
    """Process received messages until connection is terminated."""

def _notify_client_termination((self)) -> int:
    """Send None to all clients with open receive queues."""

def _connect_to_endpoint((self, channel: AsyncChannel[Any])) -> None:
    """Connect channel to specified endpoint."""

def open_channel((
        self,
        endpoint: ChannelEndpoint[T, Any, Any],
    )) -> AsyncGenerator[AsyncChannel[T], None]:
    """Open a streaming channel over the websocket."""

def _send_call((
        self,
        rpc: AsyncRemoteCall,
        endpoint: str,
        params: AnyLMStudioStruct | None = None,
    )) -> None:
    """Initiate remote call to specified endpoint."""

def remote_call((
        self,
        endpoint: str,
        params: AnyLMStudioStruct | None,
        notice_prefix: str = "RPC",
    )) -> Any:
    """Make a remote procedure call over the websocket."""

def __init__((self, client: "AsyncClient")) -> None:
    """Initialize asynchronous API client session."""

def _ensure_connected((self)) -> None:

def __aenter__((self)) -> Self:

def __aexit__((self, *args: Any)) -> None:

def connect((self)) -> AsyncLMStudioWebsocket:
    """Connect the client session."""

def disconnect((self)) -> None:
    """Disconnect the client session."""

def _create_channel((
        self,
        endpoint: ChannelEndpoint[T, Any, Any],
    )) -> AsyncGenerator[AsyncChannel[T], None]:
    """Connect a channel to an LM Studio streaming endpoint."""

def remote_call((
        self,
        endpoint: str,
        params: AnyLMStudioStruct | None = None,
        notice_prefix: str = "RPC",
    )) -> Any:
    """Send a remote call to the given RPC endpoint and wait for the result."""

def load_new_instance((
        self,
        *,
        ttl: int | None = DEFAULT_TTL,
        instance_identifier: str | None = None,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TAsyncModelHandle:
    """Load this model with the given identifier and configuration."""

def model((
        self,
        *,
        ttl: int | None = DEFAULT_TTL,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TAsyncModelHandle:
    """Retrieve model with given identifier, or load it with given configuration."""

def __init__((
        self, model_info: DictObject, session: "AsyncSessionEmbedding"
    )) -> None:
    """Initialize downloaded embedding model details."""

def __init__((self, model_info: DictObject, session: "AsyncSessionLlm")) -> None:
    """Initialize downloaded embedding model details."""

def list_downloaded_models((self)) -> Sequence[AnyAsyncDownloadedModel]:
    """Get the list of all downloaded models that are available for loading."""

def _process_download_listing((
        self, model_info: DictObject
    )) -> AnyAsyncDownloadedModel:

def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:

def _prepare_file((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:
    """Add a file to the server. Returns a file handle for use in prediction requests."""

def prepare_image((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:
    """Add an image to the server. Returns a file handle for use in prediction requests."""

def download((
        self,
        on_progress: DownloadProgressCallback | None = None,
        on_finalize: DownloadFinalizedCallback | None = None,
    )) -> str:
    """Download a model and get its path for loading."""

def get_download_options((
        self,
    )) -> Sequence[AsyncModelDownloadOption]:
    """Get the download options for the specified model."""

def search_models((
        self,
        search_term: str | None = None,
        limit: int | None = None,
        compatibility_types: list[ModelCompatibilityType] | None = None,
    )) -> Sequence[AsyncAvailableModel]:
    """Search for downloadable models satisfying a search query."""

def _system_session((self)) -> AsyncSessionSystem:

def _files_session((self)) -> _AsyncSessionFiles:

def _get_load_config((
        self, model_specifier: AnyModelSpecifier
    )) -> AnyLoadConfig:
    """Get the model load config for the specified model."""

def _get_api_model_info((self, model_specifier: AnyModelSpecifier)) -> Any:
    """Get the raw model info (if any) for a model matching the given criteria."""

def get_model_info((
        self, model_specifier: AnyModelSpecifier
    )) -> ModelInstanceInfo:
    """Get the model info (if any) for a model matching the given criteria."""

def _get_context_length((self, model_specifier: AnyModelSpecifier)) -> int:
    """Get the context length of the specified model."""

def _count_tokens((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> int:

def _tokenize_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[int]:

def _tokenize((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[int] | Sequence[Sequence[int]]:
    """Tokenize the input string(s) using the specified model."""

def _create_handle((self, model_identifier: str)) -> TAsyncModelHandle:
    """Get a symbolic handle to the specified model."""

def model((
        self,
        model_key: str | None = None,
        /,
        *,
        ttl: int | None = DEFAULT_TTL,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TAsyncModelHandle:
    """Get a handle to the specified model (loading it if necessary)."""

def list_loaded((self)) -> Sequence[TAsyncModelHandle]:
    """Get the list of currently loaded models."""

def unload((self, model_identifier: str)) -> None:
    """Unload the specified model."""

def load_new_instance((
        self,
        model_key: str,
        instance_identifier: str | None = None,
        *,
        ttl: int | None = DEFAULT_TTL,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TAsyncModelHandle:
    """Load the specified model with the given identifier and configuration."""

def _load_new_instance((
        self,
        model_key: str,
        instance_identifier: str | None,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TAsyncModelHandle:

def _get_or_load((
        self,
        model_key: str,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TAsyncModelHandle:
    """Load the specified model with the given identifier and configuration."""

def _get_any((self)) -> TAsyncModelHandle:
    """Get a handle to any loaded model."""

def _is_relevant_model((
        cls, model: AnyAsyncDownloadedModel
    )) -> TypeIs[TAsyncDownloadedModel]:

def list_downloaded((self)) -> Sequence[TAsyncDownloadedModel]:
    """Get the list of currently downloaded models that are available for loading."""

def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:

def __init__((
        self,
        channel_cm: AsyncPredictionCM,
        endpoint: PredictionEndpoint,
    )) -> None:
    """Initialize a prediction process representation."""

def start((self)) -> None:
    """Send the prediction request."""

def aclose((self)) -> None:
    """Terminate the prediction processing (if not already terminated)."""

def __aenter__((self)) -> Self:

def __aexit__((
        self,
        _exc_type: Type[BaseException] | None,
        exc_val: BaseException | None,
        _exc_tb: TracebackType | None,
    )) -> None:

def __aiter__((self)) -> AsyncIterator[LlmPredictionFragment]:

def wait_for_result((self)) -> PredictionResult:
    """Wait for the result of the prediction."""

def cancel((self)) -> None:
    """Cancel the prediction process."""

def __init__((self, client: "AsyncClient")) -> None:
    """Initialize API client session for LLM interaction."""

def _create_handle((self, model_identifier: str)) -> "AsyncLLM":
    """Create a symbolic handle to the specified LLM model."""

def _complete_stream((
        self,
        model_specifier: AnyModelSpecifier,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> AsyncPredictionStream:
    """Request a one-off prediction without any context and stream the generated tokens."""

def _respond_stream((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        on_message: PredictionMessageCallback | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> AsyncPredictionStream:
    """Request a response in an ongoing assistant chat session and stream the generated tokens."""

def _apply_prompt_template((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        opts: LlmApplyPromptTemplateOpts | LlmApplyPromptTemplateOptsDict = {},
    )) -> str:
    """Apply a prompt template to the given history."""

def __init__((self, client: "AsyncClient")) -> None:
    """Initialize API client session for embedding model interaction."""

def _create_handle((self, model_identifier: str)) -> "AsyncEmbeddingModel":
    """Create a symbolic handle to the specified embedding model."""

def _embed_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[float]:

def _embed((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[float] | Sequence[Sequence[float]]:
    """Request embedding vectors for the given input string(s)."""

def unload((self)) -> None:
    """Unload this model."""

def get_info((self)) -> ModelInstanceInfo:
    """Get the model info for this model."""

def get_load_config((self)) -> AnyLoadConfig:
    """Get the model load config for this model."""

def tokenize((
        self, input: str | Iterable[str]
    )) -> Sequence[int] | Sequence[Sequence[int]]:
    """Tokenize the input string(s) using this model."""

def count_tokens((self, input: str)) -> int:
    """Report the number of tokens needed for the input string using this model."""

def get_context_length((self)) -> int:
    """Get the context length of this model."""

def complete_stream((
        self,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> AsyncPredictionStream:
    """Request a one-off prediction without any context and stream the generated tokens."""

def complete((
        self,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionResult:
    """Request a one-off prediction without any context."""

def respond_stream((
        self,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> AsyncPredictionStream:
    """Request a response in an ongoing assistant chat session and stream the generated tokens."""

def respond((
        self,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionResult:
    """Request a response in an ongoing assistant chat session."""

def apply_prompt_template((
        self,
        history: Chat | ChatHistoryDataDict | str,
        opts: LlmApplyPromptTemplateOpts | LlmApplyPromptTemplateOptsDict = {},
    )) -> str:
    """Apply a prompt template to the given history."""

def embed((
        self, input: str | Iterable[str]
    )) -> Sequence[float] | Sequence[Sequence[float]]:
    """Request embedding vectors for the given input string(s)."""

def __init__((self, api_host: str | None = None)) -> None:
    """Initialize API client."""

def __aenter__((self)) -> Self:

def __aexit__((self, *args: Any)) -> None:

def aclose((self)) -> None:
    """Close any started client sessions."""

def _get_session((self, cls: Type[TAsyncSession])) -> TAsyncSession:
    """Get the client session of the given type."""

def llm((self)) -> AsyncSessionLlm:
    """Return the LLM API client session."""

def embedding((self)) -> AsyncSessionEmbedding:
    """Return the embedding model API client session."""

def system((self)) -> AsyncSessionSystem:
    """Return the system API client session."""

def files((self)) -> _AsyncSessionFiles:
    """Return the files API client session."""

def repository((self)) -> AsyncSessionRepository:
    """Return the repository API client session."""

def _prepare_file((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:
    """Add a file to the server. Returns a file handle for use in prediction requests."""

def prepare_image((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:
    """Add an image to the server. Returns a file handle for use in prediction requests."""

def list_downloaded_models((
        self, namespace: str | None = None
    )) -> Sequence[AnyAsyncDownloadedModel]:
    """Get the list of downloaded models."""

def list_loaded_models((
        self, namespace: str | None = None
    )) -> Sequence[AnyAsyncModel]:
    """Get the list of loaded models using the default global client."""


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/history.py
# Language: python

import os
import uuid
from base64 import b64encode
from collections.abc import Mapping
from copy import deepcopy
from hashlib import sha256
from pathlib import Path
from typing import (
    Awaitable,
    BinaryIO,
    Callable,
    Iterable,
    MutableSequence,
    Protocol,
    Sequence,
    Tuple,
    TypeAlias,
    cast,
    get_args as get_typeform_args,
    runtime_checkable,
)
from typing_extensions import (
    # Native in 3.11+
    Self,
    # Native in 3.13+
    TypeIs,
)
from msgspec import to_builtins
from .sdk_api import (
    LMStudioOSError,
    LMStudioRuntimeError,
    LMStudioValueError,
    sdk_public_api,
)
from .schemas import DictObject, LMStudioStruct, _format_json
from ._sdk_models import (
    AnyChatMessage,
    AnyChatMessageDict,
    AssistantResponse,
    ChatHistoryData,
    ChatHistoryDataDict,
    FileHandle,
    FileHandleDict,
    FilesRpcUploadFileBase64Parameter,
    FileType,
    SystemPrompt,
    TextData,
    TextDataDict,
    ToolCallRequest,
    ToolCallRequestData,
    ToolCallRequestDataDict,
    ToolCallRequestDict,
    ToolCallResultData,
    ToolCallResultDataDict,
    ToolResultMessage,
    UserMessage,
)

class _ServerAssistantResponse(P, r, o, t, o, c, o, l):
    """Convert assistant responses from server to history message content."""
    def _to_history_content((self)) -> str:
        """Return the history message content for this response."""

class Chat:
    """Helper class to track LLM interactions."""
    def __init__((
        self,
        initial_prompt: SystemPromptInput | None = None,
        *,
        # Public API is to call `from_history` rather than supplying this directly
        _initial_history: ChatHistoryData | None = None,
    )):
        """Initialize LLM interaction history tracking."""
    def __str__((self)) -> str:
    def _get_history((self)) -> ChatHistoryDataDict:
    def _get_history_for_prediction((self)) -> ChatHistoryDataDict:
        """Convert the current history to a format suitable for an LLM prediction."""
    def _get_history_for_copy((self)) -> ChatHistoryData:
        """Convert the current history to a format suitable for initializing a new instance."""
    def _add_entries((
        self,
        entries: Iterable[
            AnyChatMessage | DictObject | tuple[str, AnyChatMessageInput]
        ],
    )) -> Sequence[AnyChatMessage]:
        """Add history entries for the given (role, content) pairs."""
    def _get_last_message((self, role: str)) -> AnyChatMessage | None:
        """Return the most recent message, but only if it has the given role."""
    def _raise_if_consecutive((self, role: str, description: str)) -> None:
    def add_tool_results((
        self, results: Iterable[ToolCallResultInput]
    )) -> ToolResultMessage:
        """Add multiple tool results to the chat history as a single message."""
    def add_tool_result((self, result: ToolCallResultInput)) -> ToolResultMessage:
        """Add a new tool result to the chat history."""

class _LocalFileData:
    """Local file data to be added to a chat history."""
    def __init__((self, src: LocalFileInput, name: str | None = None)) -> None:
    def _get_cache_key((self)) -> _FileHandleCacheKey:
    def _as_fetch_param((self)) -> FilesRpcUploadFileBase64Parameter:

class _FileHandleCache:
    """Local file data to be added to a chat session."""
    def __init__((self)) -> None:
    def _get_pending_files_to_fetch((self)) -> Mapping[_FileHandleCacheKey, _PendingFile]:
    def _fetch_file_handles((self, fetch_file_handle: _FetchFileHandle)) -> None:
        """Synchronously fetch all currently pending file handles from the LM Studio API."""
    def _fetch_file_handles_async((
        self, fetch_file_handle: _AsyncFetchFileHandle
    )) -> None:
        """Asynchronously fetch all currently pending file handles from the LM Studio API."""

def _to_history_content((self)) -> str:
    """Return the history message content for this response."""

def _is_user_message_input((value: AnyUserMessageInput)) -> TypeIs[UserMessageInput]:

def _is_chat_message_input((value: AnyChatMessageInput)) -> TypeIs[ChatMessageInput]:

def __init__((
        self,
        initial_prompt: SystemPromptInput | None = None,
        *,
        # Public API is to call `from_history` rather than supplying this directly
        _initial_history: ChatHistoryData | None = None,
    )):
    """Initialize LLM interaction history tracking."""

def _messages((self)) -> MutableSequence[AnyChatMessage]:

def __str__((self)) -> str:

def _get_history((self)) -> ChatHistoryDataDict:

def _get_history_for_prediction((self)) -> ChatHistoryDataDict:
    """Convert the current history to a format suitable for an LLM prediction."""

def _get_history_for_copy((self)) -> ChatHistoryData:
    """Convert the current history to a format suitable for initializing a new instance."""

def from_history((
        cls, history: str | Self | ChatHistoryData | ChatHistoryDataDict
    )) -> Self:
    """Create a new chat context from the given chat history data."""

def copy((self)) -> Self:
    """Make a copy of this chat (future updates to either chat will not affect the other)."""

def __deepcopy__((self, _memo: object)) -> Self:

def add_entry((self, role: str, content: AnyChatMessageInput)) -> AnyChatMessage:
    """Add a new history entry for the given role name (user/system/assistant/tool)."""

def append((self, message: AnyChatMessage | AnyChatMessageDict)) -> AnyChatMessage:
    """Append a copy of an already formatted message to the chat history."""

def _add_entries((
        self,
        entries: Iterable[
            AnyChatMessage | DictObject | tuple[str, AnyChatMessageInput]
        ],
    )) -> Sequence[AnyChatMessage]:
    """Add history entries for the given (role, content) pairs."""

def _get_last_message((self, role: str)) -> AnyChatMessage | None:
    """Return the most recent message, but only if it has the given role."""

def _raise_if_consecutive((self, role: str, description: str)) -> None:

def add_system_prompt((self, prompt: SystemPromptInput)) -> SystemPrompt:
    """Add a new system prompt to the chat history."""

def add_user_message((
        self,
        content: UserMessageInput | Iterable[UserMessageInput],
        *,
        images: Sequence[FileHandleInput] = (),
        # Not yet implemented (server file preparation API only supports the image file types)
        _files: Sequence[FileHandleInput] = (),
    )) -> UserMessage:
    """Add a new user message to the chat history."""

def _parse_assistant_response((
        cls, response: AnyAssistantResponseInput
    )) -> TextData | FileHandle:

def _parse_tool_call_request((
        cls, request: ToolCallRequestInput
    )) -> ToolCallRequestData:

def add_assistant_response((
        self,
        response: AnyAssistantResponseInput,
        tool_call_requests: Iterable[ToolCallRequestInput] = (),
    )) -> AssistantResponse:
    """Add a new 'assistant' response to the chat history."""

def _parse_tool_result((cls, result: ToolCallResultInput)) -> ToolCallResultData:

def add_tool_results((
        self, results: Iterable[ToolCallResultInput]
    )) -> ToolResultMessage:
    """Add multiple tool results to the chat history as a single message."""

def add_tool_result((self, result: ToolCallResultInput)) -> ToolResultMessage:
    """Add a new tool result to the chat history."""

def _get_file_details((src: LocalFileInput)) -> Tuple[str, bytes]:
    """Read file contents as binary data and generate a suitable default name."""

def __init__((self, src: LocalFileInput, name: str | None = None)) -> None:

def _get_cache_key((self)) -> _FileHandleCacheKey:

def _as_fetch_param((self)) -> FilesRpcUploadFileBase64Parameter:

def __init__((self)) -> None:

def _get_file_handle((
        self, src: LocalFileInput, name: str | None = None
    )) -> FileHandle:

def _get_pending_files_to_fetch((self)) -> Mapping[_FileHandleCacheKey, _PendingFile]:

def _update_pending_handle((
        pending_handle: FileHandle, fetched_handle: FileHandle
    )) -> None:

def _fetch_file_handles((self, fetch_file_handle: _FetchFileHandle)) -> None:
    """Synchronously fetch all currently pending file handles from the LM Studio API."""

def _fetch_file_handles_async((
        self, fetch_file_handle: _AsyncFetchFileHandle
    )) -> None:
    """Asynchronously fetch all currently pending file handles from the LM Studio API."""


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/json_api.py
# Language: python

import copy
import json
import uuid
import warnings
from abc import ABC, abstractmethod
from contextlib import contextmanager
from dataclasses import dataclass, field
from typing import (
    Any,
    Callable,
    Generator,
    Generic,
    Iterable,
    Iterator,
    Mapping,
    Sequence,
    Type,
    TypeAlias,
    TypedDict,
    TypeVar,
    cast,
    get_type_hints,
    overload,
)
from typing_extensions import (
    # Native in 3.11+
    assert_never,
    NoReturn,
    Self,
)
from msgspec import Struct, convert, defstruct, to_builtins
from .sdk_api import (
    LMStudioError,
    LMStudioRuntimeError,
    LMStudioValueError,
    sdk_callback_invocation,
    sdk_public_api,
    sdk_public_type,
    _truncate_traceback,
)
from .history import AssistantResponse, Chat, ToolCallRequest, ToolCallResultData
from .schemas import (
    AnyLMStudioStruct,
    DictObject,
    LMStudioStruct,
    TWireFormat,
    _format_json,
    _snake_case_keys_to_camelCase,
    _to_json_schema,
)
from ._kv_config import (
    ResponseSchema,
    TLoadConfig,
    TLoadConfigDict,
    load_config_to_kv_config_stack,
    parse_llm_load_config,
    parse_prediction_config,
    prediction_config_to_kv_config_stack,
)
from ._sdk_models import (
    DownloadModelChannelRequest,
    DownloadModelChannelRequestDict,
    DownloadProgressUpdate,
    EmbeddingChannelLoadModelCreationParameter,
    EmbeddingChannelLoadModelCreationParameterDict,
    EmbeddingChannelGetOrLoadCreationParameter,
    EmbeddingChannelGetOrLoadCreationParameterDict,
    EmbeddingLoadModelConfig,
    EmbeddingLoadModelConfigDict,
    EmbeddingModelInfo,
    EmbeddingModelInstanceInfo,
    EmbeddingRpcGetLoadConfigParameter,
    EmbeddingRpcGetModelInfoParameter,
    EmbeddingRpcTokenizeParameter,
    EmbeddingRpcUnloadModelParameter,
    KvConfigStack,
    LlmChannelLoadModelCreationParameter,
    LlmChannelLoadModelCreationParameterDict,
    LlmChannelGetOrLoadCreationParameter,
    LlmChannelGetOrLoadCreationParameterDict,
    LlmInfo,
    LlmInstanceInfo,
    LlmLoadModelConfig,
    LlmLoadModelConfigDict,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmPredictionFragment,
    LlmPredictionStats,
    LlmRpcGetLoadConfigParameter,
    LlmRpcGetModelInfoParameter,
    LlmRpcTokenizeParameter,
    LlmRpcUnloadModelParameter,
    LlmTool,
    LlmToolUseSettingToolArray,
    ModelCompatibilityType,
    ModelInfo,
    ModelInstanceInfo,
    ModelSearchOptsDict,
    ModelSearchResultDownloadOptionData,
    ModelSearchResultEntryData,
    ModelSpecifier,
    ModelSpecifierDict,
    ModelSpecifierInstanceReference,
    ModelSpecifierQuery,
    ModelQuery,
    ModelQueryDict,
    PredictionChannelRequest,
    PredictionChannelRequestDict,
    RepositoryRpcGetModelDownloadOptionsParameter,
    RepositoryRpcSearchModelsParameter,
    SerializedLMSExtendedError,
)
from ._logging import new_logger, LogEventContext, StructuredLogger

class ModelSessionTypes(G, e, n, e, r, i, c, [, T, L, o, a, d, C, o, n, f, i, g, ]):
    """Helper class to group related types for code sharing across model namespaces."""

class ModelTypesEmbedding(M, o, d, e, l, S, e, s, s, i, o, n, T, y, p, e, s, [, E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ]):
    """Relevant structs for the embedding model namespace."""

class ModelTypesLlm(M, o, d, e, l, S, e, s, s, i, o, n, T, y, p, e, s, [, L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ]):
    """Relevant structs for the LLM namespace."""

class LMStudioServerError(L, M, S, t, u, d, i, o, E, r, r, o, r):
    """Problems reported by the LM Studio instance."""
    def __init__((self, message: str, details: DictObject | None = None)) -> None:
        """Initialize with SDK message and remote error details."""

class LMStudioModelNotFoundError(L, M, S, t, u, d, i, o, S, e, r, v, e, r, E, r, r, o, r):
    """No model matching the given specifier could be located on the server."""

class LMStudioPresetNotFoundError(L, M, S, t, u, d, i, o, S, e, r, v, e, r, E, r, r, o, r):
    """No preset config matching the given identifier could be located on the server."""

class LMStudioChannelClosedError(L, M, S, t, u, d, i, o, S, e, r, v, e, r, E, r, r, o, r):
    """Streaming channel unexpectedly closed by the LM Studio instance."""
    def __init__((self, message: str)) -> None:
        """Initialize with SDK message."""

class LMStudioPredictionError(L, M, S, t, u, d, i, o, S, e, r, v, e, r, E, r, r, o, r):
    """Problems reported by the LM Studio instance during a model prediction."""

class LMStudioClientError(L, M, S, t, u, d, i, o, E, r, r, o, r):
    """Problems identified locally in the SDK client."""

class LMStudioUnknownMessageWarning(L, M, S, t, u, d, i, o, C, l, i, e, n, t, E, r, r, o, r, ,,  , U, s, e, r, W, a, r, n, i, n, g):
    """Client has received a message in a format it wasn't expecting."""

class LMStudioCancelledError(L, M, S, t, u, d, i, o, C, l, i, e, n, t, E, r, r, o, r):
    """Requested operation was cancelled via the SDK client session."""

class LMStudioWebsocketError(L, M, S, t, u, d, i, o, C, l, i, e, n, t, E, r, r, o, r):
    """Client websocket sessiqqon has terminated (or was never opened)."""

class ModelLoadResult:
    """Details of a loaded LM Studio model."""

class PredictionResult:
    """The final result of a prediction."""
    def __post_init__((self)) -> None:
    def __repr__((self)) -> str:
    def __str__((self)) -> str:
    def _to_history_content((self)) -> str:

class PredictionRoundResult(P, r, e, d, i, c, t, i, o, n, R, e, s, u, l, t):
    """The result of a prediction within a multi-round tool using action."""

class ActResult:
    """Summary of a completed multi-round tool using action."""

class MultiplexingManager(G, e, n, e, r, i, c, [, T, Q, u, e, u, e, ]):
    """Helper class to allocate distinct protocol multiplexing IDs."""
    def __init__((self, logger: StructuredLogger)) -> None:
        """Initialize ID multiplexer."""
    def all_queues((self)) -> Iterator[TQueue]:
        """Iterate over all queues (for example, to send a shutdown message)."""
    def _get_next_channel_id((self)) -> int:
        """Get next distinct channel ID."""
    def _get_next_call_id((self)) -> int:
        """Get next distinct RPC ID."""
    def map_rx_message((self, message: DictObject)) -> TQueue | None:
        """Map received message to the relevant demultiplexing queue."""

class ChannelRxEvent(G, e, n, e, r, i, c, [, T, ]):

class ChannelFinishedEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, N, o, n, e, ]):

class ChannelEndpoint(G, e, n, e, r, i, c, [, T, ,,  , T, R, x, E, v, e, n, t, ,,  , T, W, i, r, e, F, o, r, m, a, t, ], ,,  , A, B, C):
    """Base class for defining API channel endpoints."""
    def __init__((
        self, creation_params: LMStudioStruct[TWireFormat] | DictObject
    )) -> None:
        """Initialize API channel endpoint handler."""
    def _set_result((self, result: T)) -> ChannelFinishedEvent:
    def result((self)) -> T:
        """Read the result from a finished channel."""
    def report_unknown_message((self, unknown_message: Any)) -> None:
    def handle_message_events((self, contents: DictObject | None)) -> None:

class ModelDownloadProgressEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, D, o, w, n, l, o, a, d, P, r, o, g, r, e, s, s, U, p, d, a, t, e, ]):

class ModelDownloadFinalizeEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, N, o, n, e, ]):

class ModelDownloadEndpoint(
,  ,  ,  ,  , C, h, a, n, n, e, l, E, n, d, p, o, i, n, t, [, s, t, r, ,,  , M, o, d, e, l, D, o, w, n, l, o, a, d, R, x, E, v, e, n, t, ,,  , D, o, w, n, l, o, a, d, M, o, d, e, l, C, h, a, n, n, e, l, R, e, q, u, e, s, t, D, i, c, t, ], 
):
    """API channel endpoint for downloading available models."""
    def __init__((
        self,
        download_identifier: str,
        on_progress: DownloadProgressCallback | None = None,
        on_finalize: DownloadFinalizedCallback | None = None,
    )) -> None:
    def iter_message_events((
        self, contents: DictObject | None
    )) -> Iterable[ModelDownloadRxEvent]:
    def handle_rx_event((self, event: ModelDownloadRxEvent)) -> None:
    def _report_progress((self, progress: DownloadProgressUpdate)) -> None:
    def _finalize_download((self)) -> None:

class ModelLoadingProgressEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, f, l, o, a, t, ]):

class _ModelLoadingEndpoint(
,  ,  ,  ,  , C, h, a, n, n, e, l, E, n, d, p, o, i, n, t, [, M, o, d, e, l, L, o, a, d, R, e, s, u, l, t, ,,  , M, o, d, e, l, L, o, a, d, i, n, g, R, x, E, v, e, n, t, ,,  , T, W, i, r, e, F, o, r, m, a, t, ], 
):
    def __init__((
        self,
        model_key: str,
        creation_params: LMStudioStruct[TWireFormat] | DictObject,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> None:
    def _update_progress((self, progress: float)) -> Iterable[ModelLoadingProgressEvent]:
    def iter_message_events((
        self, contents: DictObject | None
    )) -> Iterable[ModelLoadingRxEvent]:
    def handle_rx_event((self, event: ModelLoadingRxEvent)) -> None:
    def _report_progress((self, progress: float)) -> None:

class LoadModelEndpoint(
,  ,  ,  ,  , _, M, o, d, e, l, L, o, a, d, i, n, g, E, n, d, p, o, i, n, t, [, L, o, a, d, M, o, d, e, l, C, h, a, n, n, e, l, R, e, q, u, e, s, t, D, i, c, t, ], ,, 
,  ,  ,  ,  , G, e, n, e, r, i, c, [, T, L, o, a, d, C, o, n, f, i, g, ,,  , T, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ], ,, 
):
    """API channel endpoint for loading downloaded models."""
    def __init__((
        self,
        model_key: str,
        instance_identifier: str | None,
        ttl: int | None,
        creation_param_type: Type[LoadModelChannelRequest],
        config_type: Type[TLoadConfig],
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> None:
        """Load the specified model with the given identifier and configuration."""

class GetOrLoadEndpoint(
,  ,  ,  ,  , _, M, o, d, e, l, L, o, a, d, i, n, g, E, n, d, p, o, i, n, t, [, G, e, t, O, r, L, o, a, d, C, h, a, n, n, e, l, R, e, q, u, e, s, t, D, i, c, t, ], ,, 
,  ,  ,  ,  , G, e, n, e, r, i, c, [, T, L, o, a, d, C, o, n, f, i, g, ,,  , T, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ], ,, 
):
    """API channel endpoint for ensuring models have been loaded."""
    def __init__((
        self,
        model_key: str,
        ttl: int | None,
        creation_param_type: Type[GetOrLoadChannelRequest],
        config_type: Type[TLoadConfig],
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> None:
        """Get the specified model, loading with given configuration if necessary."""

class ToolFunctionDefDict(T, y, p, e, d, D, i, c, t):
    """SDK input format to specify an LLM tool call and its implementation (as a dict)."""

class ToolFunctionDef:
    """SDK input format to specify an LLM tool call and its implementation."""
    def _to_llm_tool_def((self)) -> tuple[type[Struct], LlmTool]:

class PredictionPrepProgressEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, f, l, o, a, t, ]):

class PredictionFragmentEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, L, l, m, P, r, e, d, i, c, t, i, o, n, F, r, a, g, m, e, n, t, ]):

class PredictionToolCallEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, T, o, o, l, C, a, l, l, R, e, q, u, e, s, t, ]):

class PredictionToolCallAbortedEvent(C, h, a, n, n, e, l, R, x, E, v, e, n, t, [, N, o, n, e, ]):

class PredictionEndpoint(
,  ,  ,  ,  , C, h, a, n, n, e, l, E, n, d, p, o, i, n, t, [, P, r, e, d, i, c, t, i, o, n, R, e, s, u, l, t, ,,  , P, r, e, d, i, c, t, i, o, n, R, x, E, v, e, n, t, ,,  , P, r, e, d, i, c, t, i, o, n, C, h, a, n, n, e, l, R, e, q, u, e, s, t, D, i, c, t, ], ,, 
):
    """Helper class for prediction endpoint message handling."""
    def __init__((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset_config: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
        # The remaining options are only relevant for multi-round tool actions
        handle_invalid_tool_request: Callable[
            [LMStudioPredictionError, ToolCallRequest | None], str | None
        ]
        | None = None,
        llm_tools: LlmToolUseSettingToolArray | None = None,
        client_tool_map: ClientToolMap | None = None,
    )) -> None:
    def _update_prompt_processing_progress((
        self, progress: float
    )) -> Iterable[PredictionPrepProgressEvent]:
    def iter_message_events((
        self, contents: DictObject | None
    )) -> Iterable[PredictionRxEvent]:
    def handle_rx_event((self, event: PredictionRxEvent)) -> None:
    def _report_prompt_processing_progress((self, progress: float)) -> None:
    def _handle_invalid_tool_request((
        self,
        err_msg: str,
        request: ToolCallRequest | None = None,
        *,
        exc: Exception | None = None,
    )) -> str:
    def _handle_failed_tool_request((
        self, exc: Exception, request: ToolCallRequest
    )) -> ToolCallResultData:
    def request_tool_call((
        self, request: ToolCallRequest
    )) -> Callable[[], ToolCallResultData]:
    def mark_cancelled((self)) -> None:
        """Mark the prediction as cancelled and quietly drop incoming tokens."""

class CompletionEndpoint(P, r, e, d, i, c, t, i, o, n, E, n, d, p, o, i, n, t):
    """API channel endpoint for requesting text completion from a model."""
    def __init__((
        self,
        model_specifier: AnyModelSpecifier,
        prompt: str,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset_config: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> None:
        """Load the specified model with the given identifier and configuration."""

class ChatResponseEndpoint(P, r, e, d, i, c, t, i, o, n, E, n, d, p, o, i, n, t):
    """API channel endpoint for requesting a chat response from a model."""

class PredictionStreamBase:
    """Common base class for sync and async prediction streams."""
    def __init__((
        self,
        endpoint: PredictionEndpoint,
    )) -> None:
        """Initialize a prediction process representation."""
    def _set_error((self, error: BaseException)) -> None:
        """Mark the prediction as failed with an error."""
    def _mark_started((self)) -> None:
        """Mark the prediction as started."""
    def _mark_finished((self)) -> None:
        """Mark the prediction as complete and set final metadata."""
    def _mark_cancelled((self)) -> None:
        """Mark the prediction as cancelled and quietly drop incoming tokens."""

class ChannelHandler(G, e, n, e, r, i, c, [, T, E, n, d, p, o, i, n, t, ]):
    """Bidirectional subchannel message handling."""
    def __init__((
        self,
        channel_id: int,
        endpoint: TEndpoint,
        log_context: LogEventContext,
    )) -> None:
        """Initialize websocket streaming channel."""
    def get_creation_message((self)) -> DictObject:
        """Get the message to send to create this channel."""
    def get_cancel_message((self)) -> DictObject:
        """Get the message to send to cancel this channel."""
    def handle_rx_message((
        self,
        message: DictObject,
    )) -> DictObject | None:
        """Stream received channel messages until channel is closed by server."""

class RemoteCallHandler:
    """Remote procedure call message handling."""
    def __init__((
        self,
        call_id: int,
        log_context: LogEventContext,
        notice_prefix: str = "RPC",
    )) -> None:
        """Initialize websocket remote procedure call."""
    def get_rpc_message((
        self, endpoint: str, params: AnyLMStudioStruct | None
    )) -> DictObject:
        """Get the message to send to initiate this remote procedure call."""
    def handle_rx_message((self, message: DictObject)) -> Any:
        """Handle received call response."""

class LMStudioWebsocket(G, e, n, e, r, i, c, [, T, W, e, b, s, o, c, k, e, t, ,,  , T, Q, u, e, u, e, ]):
    """Common base class for LM Studio websocket clients."""
    def __init__((
        self,
        ws_url: str,
        auth_details: DictObject,
        log_context: LogEventContext | None = None,
    )) -> None:
        """Initialize I/O independent websocket details."""
    def _get_connection_failure_error((
        self, exc: Exception | None = None
    )) -> LMStudioWebsocketError:
    def _get_auth_failure_error((self, details: Any)) -> LMStudioServerError:
    def _fail_if_connected((self, err_msg: str)) -> None | NoReturn:
        """Raise exception with given message if websocket is connected."""
    def _ensure_connected((self, usage: str)) -> None | NoReturn:
        """Raise exception with given expected usage if websocket is not connected."""

class ClientBase:
    """Common base class for SDK client interfaces."""
    def __init__((self, api_host: str | None = None)) -> None:
        """Initialize API client."""

class ClientSession(G, e, n, e, r, i, c, [, T, C, l, i, e, n, t, ,,  , T, L, M, S, t, u, d, i, o, W, e, b, s, o, c, k, e, t, ]):
    """Common base class for LM Studio client sessions."""
    def __init__((self, client: TClient)) -> None:
        """Initialize API client session."""
    def _fail_if_connected((self, err_msg: str)) -> None | NoReturn:
        """Raise given error if websocket is connected."""
    def _get_lmsws((self, usage: str)) -> TLMStudioWebsocket | NoReturn:
        """Return websocket, raising given error if websocket is not connected."""
    def _get_model_search_params((
        self,
        search_term: str | None = None,
        limit: int | None = None,
        compatibility_types: list[ModelCompatibilityType] | None = None,
    )) -> RepositoryRpcSearchModelsParameter:

class SessionData(G, e, n, e, r, i, c, [, T, S, t, r, u, c, t, ,,  , T, S, e, s, s, i, o, n, ]):
    """API data linked to a session to allow making further requests."""
    def __init__((
        self, wrapped_cls: Type[TStruct], raw_data: DictObject, session: TSession
    )) -> None:
    def __repr__((self)) -> str:
    def __eq__((self, other: Any)) -> bool:

class AvailableModelBase(S, e, s, s, i, o, n, D, a, t, a, [, M, o, d, e, l, S, e, a, r, c, h, R, e, s, u, l, t, E, n, t, r, y, D, a, t, a, ,,  , T, S, e, s, s, i, o, n, ]):
    def __init__((self, search_result: DictObject, session: TSession)) -> None:
    def _get_download_query_params((
        self,
    )) -> RepositoryRpcGetModelDownloadOptionsParameter:

class ModelDownloadOptionBase(
,  ,  ,  ,  , S, e, s, s, i, o, n, D, a, t, a, [, M, o, d, e, l, S, e, a, r, c, h, R, e, s, u, l, t, D, o, w, n, l, o, a, d, O, p, t, i, o, n, D, a, t, a, ,,  , T, S, e, s, s, i, o, n, ], 
):
    def __init__((self, download_info: DictObject, session: TSession)) -> None:
    def _get_download_endpoint((
        self,
        on_progress: DownloadProgressCallback | None = None,
        on_finalize: DownloadFinalizedCallback | None = None,
    )) -> ModelDownloadEndpoint:

class DownloadedModelBase(S, e, s, s, i, o, n, D, a, t, a, [, T, M, o, d, e, l, I, n, f, o, ,,  , T, S, e, s, s, i, o, n, ]):
    """Details of a model downloaded to the LM Studio server instance."""

class ModelHandleBase(G, e, n, e, r, i, c, [, T, S, e, s, s, i, o, n, ]):
    """Client handle for a loaded model instance in the LM Studio server instance."""
    def __init__((self, model_identifier: str, session: TSession)) -> None:
        """Initialize the LM Studio model reference."""
    def __repr__((self)) -> str:
    def __eq__((self, other: Any)) -> bool:

def _model_spec_to_api_dict((model_spec: AnyModelSpecifier)) -> ModelSpecifierDict:

def load_struct((raw_data: DictObject, data_model: Type[TStruct])) -> TStruct:
    """Convert a builtin dictionary to a LMStudioStruct (msgspec.Struct) instance."""

def _get_data_lines((data: DictObject, prefix: str = "")) -> Sequence[str]:

def __init__((self, message: str, details: DictObject | None = None)) -> None:
    """Initialize with SDK message and remote error details."""

def _format_server_error((details: SerializedLMSExtendedError)) -> str:

def from_details((message: str, details: DictObject)) -> "LMStudioServerError":
    """Return appropriate class with SDK message and server error details."""

def __init__((self, message: str)) -> None:
    """Initialize with SDK message."""

def __post_init__((self)) -> None:

def __repr__((self)) -> str:

def __str__((self)) -> str:

def _to_history_content((self)) -> str:

def from_result((cls, result: PredictionResult, round_index: int)) -> Self:
    """Create a prediction round result from its underlying prediction result."""

def _redact_json((data: DictObject)) -> DictObject:

def _redact_json((data: None)) -> None:

def _redact_json((data: DictObject | None)) -> DictObject | None:
    """Show top level structure without any substructure details."""

def __init__((self, logger: StructuredLogger)) -> None:
    """Initialize ID multiplexer."""

def all_queues((self)) -> Iterator[TQueue]:
    """Iterate over all queues (for example, to send a shutdown message)."""

def _get_next_channel_id((self)) -> int:
    """Get next distinct channel ID."""

def assign_channel_id((self, rx_queue: TQueue)) -> Generator[int, None, None]:
    """Assign distinct streaming channel ID to given queue."""

def _get_next_call_id((self)) -> int:
    """Get next distinct RPC ID."""

def assign_call_id((self, rx_queue: TQueue)) -> Generator[int, None, None]:
    """Assign distinct remote call ID to given queue."""

def map_rx_message((self, message: DictObject)) -> TQueue | None:
    """Map received message to the relevant demultiplexing queue."""

def __init__((
        self, creation_params: LMStudioStruct[TWireFormat] | DictObject
    )) -> None:
    """Initialize API channel endpoint handler."""

def api_endpoint((self)) -> str:
    """Get the API endpoint for this channel."""

def creation_params((self)) -> TWireFormat:
    """Get the creation parameters for this channel."""

def notice_prefix((self)) -> str:
    """Get the logging notification prefix for this channel."""

def is_finished((self)) -> bool:
    """Indicate whether further message reception on the channel is needed."""

def _set_result((self, result: T)) -> ChannelFinishedEvent:

def result((self)) -> T:
    """Read the result from a finished channel."""

def report_unknown_message((self, unknown_message: Any)) -> None:

def iter_message_events((self, contents: DictObject | None)) -> Iterable[TRxEvent]:

def handle_rx_event((self, event: TRxEvent)) -> None:

def handle_message_events((self, contents: DictObject | None)) -> None:

def __init__((
        self,
        download_identifier: str,
        on_progress: DownloadProgressCallback | None = None,
        on_finalize: DownloadFinalizedCallback | None = None,
    )) -> None:

def iter_message_events((
        self, contents: DictObject | None
    )) -> Iterable[ModelDownloadRxEvent]:

def handle_rx_event((self, event: ModelDownloadRxEvent)) -> None:

def _report_progress((self, progress: DownloadProgressUpdate)) -> None:

def _finalize_download((self)) -> None:

def __init__((
        self,
        model_key: str,
        creation_params: LMStudioStruct[TWireFormat] | DictObject,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> None:

def _update_progress((self, progress: float)) -> Iterable[ModelLoadingProgressEvent]:

def iter_message_events((
        self, contents: DictObject | None
    )) -> Iterable[ModelLoadingRxEvent]:

def handle_rx_event((self, event: ModelLoadingRxEvent)) -> None:

def _report_progress((self, progress: float)) -> None:

def __init__((
        self,
        model_key: str,
        instance_identifier: str | None,
        ttl: int | None,
        creation_param_type: Type[LoadModelChannelRequest],
        config_type: Type[TLoadConfig],
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> None:
    """Load the specified model with the given identifier and configuration."""

def __init__((
        self,
        model_key: str,
        ttl: int | None,
        creation_param_type: Type[GetOrLoadChannelRequest],
        config_type: Type[TLoadConfig],
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> None:
    """Get the specified model, loading with given configuration if necessary."""

def _to_llm_tool_def((self)) -> tuple[type[Struct], LlmTool]:

def from_callable((
        cls,
        f: Callable[..., Any],
        *,
        name: str | None = None,
        description: str | None = None,
    )) -> Self:
    """Derive a tool function definition from the given callable."""

def __init__((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset_config: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
        # The remaining options are only relevant for multi-round tool actions
        handle_invalid_tool_request: Callable[
            [LMStudioPredictionError, ToolCallRequest | None], str | None
        ]
        | None = None,
        llm_tools: LlmToolUseSettingToolArray | None = None,
        client_tool_map: ClientToolMap | None = None,
    )) -> None:

def _make_config_override((
        cls,
        response_format: ResponseSchema | None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None,
    )) -> tuple[bool, KvConfigStack]:

def _additional_config_options((cls)) -> DictObject:

def _update_prompt_processing_progress((
        self, progress: float
    )) -> Iterable[PredictionPrepProgressEvent]:

def iter_message_events((
        self, contents: DictObject | None
    )) -> Iterable[PredictionRxEvent]:

def handle_rx_event((self, event: PredictionRxEvent)) -> None:

def _report_prompt_processing_progress((self, progress: float)) -> None:

def _handle_invalid_tool_request((
        self,
        err_msg: str,
        request: ToolCallRequest | None = None,
        *,
        exc: Exception | None = None,
    )) -> str:

def _handle_failed_tool_request((
        self, exc: Exception, request: ToolCallRequest
    )) -> ToolCallResultData:

def request_tool_call((
        self, request: ToolCallRequest
    )) -> Callable[[], ToolCallResultData]:

def _call_requested_tool(()) -> ToolCallResultData:

def mark_cancelled((self)) -> None:
    """Mark the prediction as cancelled and quietly drop incoming tokens."""

def __init__((
        self,
        model_specifier: AnyModelSpecifier,
        prompt: str,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset_config: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> None:
    """Load the specified model with the given identifier and configuration."""

def _additional_config_options((cls)) -> DictObject:

def parse_tools((
        tools: Iterable[ToolDefinition],
    )) -> tuple[LlmToolUseSettingToolArray, ClientToolMap]:
    """Split tool function definitions into server and client details."""

def __init__((
        self,
        endpoint: PredictionEndpoint,
    )) -> None:
    """Initialize a prediction process representation."""

def stats((self)) -> LlmPredictionStats | None:
    """Get the current prediction statistics if available."""

def model_info((self)) -> LlmInfo | None:
    """Get the model descriptor for the current prediction if available."""

def _load_config((self)) -> LlmLoadModelConfig | None:
    """Get the load configuration used for the current prediction if available."""

def _prediction_config((self)) -> LlmPredictionConfig | None:
    """Get the prediction configuration used for the current prediction if available."""

def result((self)) -> PredictionResult:
    """Get the result of a completed prediction."""

def _set_error((self, error: BaseException)) -> None:
    """Mark the prediction as failed with an error."""

def _mark_started((self)) -> None:
    """Mark the prediction as started."""

def _mark_finished((self)) -> None:
    """Mark the prediction as complete and set final metadata."""

def _mark_cancelled((self)) -> None:
    """Mark the prediction as cancelled and quietly drop incoming tokens."""

def __init__((
        self,
        channel_id: int,
        endpoint: TEndpoint,
        log_context: LogEventContext,
    )) -> None:
    """Initialize websocket streaming channel."""

def endpoint((self)) -> TEndpoint:
    """Get the underlying endpoint definition for this channel."""

def get_creation_message((self)) -> DictObject:
    """Get the message to send to create this channel."""

def get_cancel_message((self)) -> DictObject:
    """Get the message to send to cancel this channel."""

def handle_rx_message((
        self,
        message: DictObject,
    )) -> DictObject | None:
    """Stream received channel messages until channel is closed by server."""

def __init__((
        self,
        call_id: int,
        log_context: LogEventContext,
        notice_prefix: str = "RPC",
    )) -> None:
    """Initialize websocket remote procedure call."""

def get_rpc_message((
        self, endpoint: str, params: AnyLMStudioStruct | None
    )) -> DictObject:
    """Get the message to send to initiate this remote procedure call."""

def handle_rx_message((self, message: DictObject)) -> Any:
    """Handle received call response."""

def _format_exc((exc: Exception)) -> str:

def __init__((
        self,
        ws_url: str,
        auth_details: DictObject,
        log_context: LogEventContext | None = None,
    )) -> None:
    """Initialize I/O independent websocket details."""

def connected((self)) -> bool:

def _get_connection_failure_error((
        self, exc: Exception | None = None
    )) -> LMStudioWebsocketError:

def _get_auth_failure_error((self, details: Any)) -> LMStudioServerError:

def _get_tx_error((message: Any, exc: Exception)) -> LMStudioWebsocketError:

def _get_rx_error((exc: Exception)) -> LMStudioWebsocketError:

def _fail_if_connected((self, err_msg: str)) -> None | NoReturn:
    """Raise exception with given message if websocket is connected."""

def _ensure_connected((self, usage: str)) -> None | NoReturn:
    """Raise exception with given expected usage if websocket is not connected."""

def __init__((self, api_host: str | None = None)) -> None:
    """Initialize API client."""

def _create_auth_message(()) -> DictObject:
    """Create an LM Studio websocket authentication message."""

def __init__((self, client: TClient)) -> None:
    """Initialize API client session."""

def client((self)) -> TClient:
    """The client instance that created this session."""

def connected((self)) -> bool:

def _fail_if_connected((self, err_msg: str)) -> None | NoReturn:
    """Raise given error if websocket is connected."""

def _get_lmsws((self, usage: str)) -> TLMStudioWebsocket | NoReturn:
    """Return websocket, raising given error if websocket is not connected."""

def _get_model_search_params((
        self,
        search_term: str | None = None,
        limit: int | None = None,
        compatibility_types: list[ModelCompatibilityType] | None = None,
    )) -> RepositoryRpcSearchModelsParameter:

def __init__((
        self, wrapped_cls: Type[TStruct], raw_data: DictObject, session: TSession
    )) -> None:

def _repr_fields((self)) -> Sequence[str]:

def __repr__((self)) -> str:

def __eq__((self, other: Any)) -> bool:

def __init__((self, search_result: DictObject, session: TSession)) -> None:

def search_result((self)) -> ModelSearchResultEntryData:

def _get_download_query_params((
        self,
    )) -> RepositoryRpcGetModelDownloadOptionsParameter:

def __init__((self, download_info: DictObject, session: TSession)) -> None:

def _repr_fields((self)) -> Sequence[str]:

def info((self)) -> ModelSearchResultDownloadOptionData:

def _get_download_endpoint((
        self,
        on_progress: DownloadProgressCallback | None = None,
        on_finalize: DownloadFinalizedCallback | None = None,
    )) -> ModelDownloadEndpoint:

def _repr_fields((self)) -> Sequence[str]:

def info((self)) -> TModelInfo:

def type((self)) -> str:

def path((self)) -> str:

def model_key((self)) -> str:

def __init__((self, model_identifier: str, session: TSession)) -> None:
    """Initialize the LM Studio model reference."""

def __repr__((self)) -> str:

def __eq__((self, other: Any)) -> bool:

def check_model_namespace((namespace: str | None)) -> str | None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/schemas.py
# Language: python

import json
from typing import (
    Any,
    ClassVar,
    Generic,
    Mapping,
    MutableMapping,
    Protocol,
    Sequence,
    TypeAlias,
    TypeVar,
    cast,
    runtime_checkable,
)
from typing_extensions import (
    # Native in 3.11+
    Self,
)
from msgspec import Struct, convert, to_builtins
from msgspec.json import schema
from .sdk_api import LMStudioValueError, sdk_public_api, sdk_public_type

class ModelSchema(P, r, o, t, o, c, o, l):
    """Protocol for classes that provide a JSON schema for their model."""

class BaseModel(S, t, r, u, c, t, ,,  , o, m, i, t, _, d, e, f, a, u, l, t, s, =, T, r, u, e, ,,  , k, w, _, o, n, l, y, =, T, r, u, e):
    """Base class for structured prediction output formatting."""

class LMStudioStruct(G, e, n, e, r, i, c, [, T, W, i, r, e, F, o, r, m, a, t, ], ,,  , S, t, r, u, c, t, ,,  , o, m, i, t, _, d, e, f, a, u, l, t, s, =, T, r, u, e, ,,  , k, w, _, o, n, l, y, =, T, r, u, e):
    """Base class for LM Studio-specific structured JSON values."""
    def to_dict((self)) -> TWireFormat:
        """Convert instance to a camelCase string-keyed dictionary."""
    def __str__((self)) -> str:

def _format_json((data: Any, *, sort_keys: bool = True)) -> str:

def _to_json_schema((cls: type, *, omit: Sequence[str] = ())) -> DictSchema:

def model_json_schema((cls)) -> DictSchema:
    """Return a JSON schema dict describing this model."""

def model_json_schema((cls)) -> DictSchema:
    """Returns JSON Schema dict describing the format of this class."""

def _snake_case_to_camelCase((key: str)) -> str:

def _snake_case_keys_to_camelCase((data: DictObject)) -> DictObject:

def _queue_dict((input_dict: DictObject, output_dict: dict[str, Any])) -> None:

def _from_any_api_dict((cls, data: DictObject)) -> Self:
    """Attempt to create an instance from a camelCase string-keyed dict."""

def _from_api_dict((cls, data: TWireFormat)) -> Self:
    """Attempt to create an instance from a camelCase string-keyed dict."""

def _from_any_dict((cls, data: DictObject)) -> Self:
    """Attempt to create an instance from a camelCase or snake_case string-keyed dict."""

def from_dict((cls, data: TWireFormat)) -> Self:
    """Attempt to create an instance from a camelCase or snake_case string-keyed dict."""

def to_dict((self)) -> TWireFormat:
    """Convert instance to a camelCase string-keyed dictionary."""

def __str__((self)) -> str:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/sdk_api.py
# Language: python

from contextlib import AsyncContextDecorator, ContextDecorator
from os import getenv
from types import TracebackType
from typing import Type, TypeVar
from typing_extensions import (
    # Native in 3.11+
    Self,
)
from ._logging import StructuredLogger

class LMStudioError(E, x, c, e, p, t, i, o, n):
    """Common base class for exceptions raised directly by the SDK."""

class LMStudioOSError(O, S, E, r, r, o, r, ,,  , L, M, S, t, u, d, i, o, E, r, r, o, r):
    """The SDK received an error while accessing the local operating system."""

class LMStudioRuntimeError(R, u, n, t, i, m, e, E, r, r, o, r, ,,  , L, M, S, t, u, d, i, o, E, r, r, o, r):
    """User requested an invalid sequence of operations from the SDK."""

class LMStudioValueError(V, a, l, u, e, E, r, r, o, r, ,,  , L, M, S, t, u, d, i, o, E, r, r, o, r):
    """User supplied an invalid value to the SDK."""

class sdk_callback_invocation:
    """Catch and log raised exceptions to protect the message handling task."""
    def __init__((self, message: str, logger: StructuredLogger)) -> None:
    def __enter__((self)) -> Self:
    def __exit__((
        self,
        exc_type: Type[BaseException],
        exc_val: BaseException,
        exc_tb: TracebackType,
    )) -> bool:

class sdk_public_api(C, o, n, t, e, x, t, D, e, c, o, r, a, t, o, r):
    """Indicates a callable forms part of the public SDK boundary."""
    def __enter__((self)) -> Self:
    def __exit__((
        self,
        exc_type: Type[BaseException],
        exc_val: BaseException,
        exc_tb: TracebackType,
    )) -> None:

class sdk_public_api_async(A, s, y, n, c, C, o, n, t, e, x, t, D, e, c, o, r, a, t, o, r):
    """Indicates a coroutine forms part of the public SDK boundary."""
    def __aenter__((self)) -> Self:
    def __aexit__((
        self,
        exc_type: Type[BaseException],
        exc_val: BaseException,
        exc_tb: TracebackType,
    )) -> None:

def sdk_public_type((cls: _C)) -> _C:
    """Indicates a class forms part of the public SDK boundary."""

def _truncate_traceback((exc: BaseException | None)) -> None:
    """Truncate API traceback at the SDK boundary (by default)."""

def __init__((self, message: str, logger: StructuredLogger)) -> None:

def __enter__((self)) -> Self:

def __exit__((
        self,
        exc_type: Type[BaseException],
        exc_val: BaseException,
        exc_tb: TracebackType,
    )) -> bool:

def __enter__((self)) -> Self:

def __exit__((
        self,
        exc_type: Type[BaseException],
        exc_val: BaseException,
        exc_tb: TracebackType,
    )) -> None:

def __aenter__((self)) -> Self:

def __aexit__((
        self,
        exc_type: Type[BaseException],
        exc_val: BaseException,
        exc_tb: TracebackType,
    )) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/src/lmstudio/sync_api.py
# Language: python

import itertools
import time
import queue
import weakref
from abc import abstractmethod
from concurrent.futures import Future as SyncFuture, ThreadPoolExecutor, as_completed
from contextlib import (
    contextmanager,
    ExitStack,
)
from types import TracebackType
from typing import (
    Any,
    ContextManager,
    Generator,
    Iterable,
    Iterator,
    Callable,
    Generic,
    Sequence,
    Type,
    TypeAlias,
    TypeVar,
)
from typing_extensions import (
    # Native in 3.11+
    Self,
    # Native in 3.13+
    TypeIs,
)
from httpx_ws import AsyncWebSocketSession
from .sdk_api import (
    LMStudioRuntimeError,
    LMStudioValueError,
    sdk_callback_invocation,
    sdk_public_api,
)
from .schemas import AnyLMStudioStruct, DictObject
from .history import (
    AssistantResponse,
    ToolResultMessage,
    Chat,
    ChatHistoryDataDict,
    FileHandle,
    LocalFileInput,
    _LocalFileData,
    ToolCallRequest,
)
from .json_api import (
    ActResult,
    AnyLoadConfig,
    AnyModelSpecifier,
    AvailableModelBase,
    ChannelEndpoint,
    ChannelHandler,
    ChatResponseEndpoint,
    ClientBase,
    ClientSession,
    CompletionEndpoint,
    DEFAULT_TTL,
    DownloadedModelBase,
    DownloadFinalizedCallback,
    DownloadProgressCallback,
    EmbeddingLoadModelConfig,
    EmbeddingLoadModelConfigDict,
    EmbeddingModelInfo,
    GetOrLoadEndpoint,
    LlmInfo,
    LlmLoadModelConfig,
    LlmLoadModelConfigDict,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmPredictionFragment,
    LMStudioCancelledError,
    LMStudioClientError,
    LMStudioPredictionError,
    LMStudioWebsocket,
    LoadModelEndpoint,
    ModelDownloadOptionBase,
    ModelHandleBase,
    ModelInstanceInfo,
    ModelLoadingCallback,
    ModelSessionTypes,
    ModelTypesEmbedding,
    ModelTypesLlm,
    PredictionEndpoint,
    PredictionFirstTokenCallback,
    PredictionFragmentCallback,
    PredictionFragmentEvent,
    PredictionMessageCallback,
    PredictionResult,
    PredictionRoundResult,
    PredictionRxEvent,
    PredictionStreamBase,
    PredictionToolCallEvent,
    PromptProcessingCallback,
    RemoteCallHandler,
    ResponseSchema,
    TModelInfo,
    ToolDefinition,
    check_model_namespace,
    load_struct,
    _model_spec_to_api_dict,
    _redact_json,
)
from ._ws_impl import AsyncWebsocketThread, SyncToAsyncWebsocketBridge
from ._kv_config import TLoadConfig, TLoadConfigDict, parse_server_config
from ._sdk_models import (
    EmbeddingRpcCountTokensParameter,
    EmbeddingRpcEmbedStringParameter,
    EmbeddingRpcTokenizeParameter,
    LlmApplyPromptTemplateOpts,
    LlmApplyPromptTemplateOptsDict,
    LlmRpcApplyPromptTemplateParameter,
    ModelCompatibilityType,
)
from ._logging import new_logger, LogEventContext

class SyncChannel(G, e, n, e, r, i, c, [, T, ]):
    """Communication subchannel over multiplexed async websocket."""
    def __init__((
        self,
        channel_id: int,
        rx_queue: queue.Queue[Any],
        endpoint: ChannelEndpoint[T, Any, Any],
        send_json: Callable[[DictObject], None],
        log_context: LogEventContext,
    )) -> None:
        """Initialize synchronous websocket streaming channel."""
    def get_creation_message((self)) -> DictObject:
        """Get the message to send to create this channel."""
    def cancel((self)) -> None:
        """Cancel the channel."""
    def rx_stream((
        self,
    )) -> Iterator[DictObject | None]:
        """Stream received channel messages until channel is closed by server."""
    def wait_for_result((self)) -> T:
        """Wait for the channel to finish and return the result."""

class SyncRemoteCall:
    """Remote procedure call over multiplexed async websocket."""
    def __init__((
        self,
        call_id: int,
        rx_queue: queue.Queue[Any],
        log_context: LogEventContext,
        notice_prefix: str = "RPC",
    )) -> None:
        """Initialize synchronous remote procedure call."""
    def get_rpc_message((
        self, endpoint: str, params: AnyLMStudioStruct | None
    )) -> DictObject:
        """Get the message to send to initiate this remote procedure call."""
    def receive_result((self)) -> Any:
        """Receive call response on the receive queue."""

class SyncLMStudioWebsocket(
,  ,  ,  ,  , L, M, S, t, u, d, i, o, W, e, b, s, o, c, k, e, t, [, S, y, n, c, T, o, A, s, y, n, c, W, e, b, s, o, c, k, e, t, B, r, i, d, g, e, ,,  , q, u, e, u, e, ., Q, u, e, u, e, [, A, n, y, ], ], 
):
    """Synchronous websocket client that handles demultiplexing of reply messages."""
    def __init__((
        self,
        ws_thread: AsyncWebsocketThread,
        ws_url: str,
        auth_details: DictObject,
        log_context: LogEventContext | None = None,
    )) -> None:
        """Initialize synchronous websocket client."""
    def __enter__((self)) -> Self:
    def __exit__((self, *args: Any)) -> None:
    def connect((self)) -> Self:
        """Connect to and authenticate with the LM Studio API."""
    def disconnect((self)) -> None:
        """Drop the LM Studio API connection."""
    def _enqueue_message((self, message: Any)) -> bool:
    def _notify_client_termination((self)) -> int:
        """Send None to all clients with open receive queues."""
    def _send_json((self, message: DictObject)) -> None:
    def _connect_to_endpoint((self, channel: SyncChannel[Any])) -> None:
        """Connect channel to specified endpoint."""
    def _send_call((
        self,
        rpc: SyncRemoteCall,
        endpoint: str,
        params: AnyLMStudioStruct | None = None,
    )) -> None:
        """Initiate remote call to specified endpoint."""
    def remote_call((
        self,
        endpoint: str,
        params: AnyLMStudioStruct | None,
        notice_prefix: str = "RPC",
    )) -> Any:
        """Make a remote procedure call over the websocket."""

class SyncSession(C, l, i, e, n, t, S, e, s, s, i, o, n, [, ", C, l, i, e, n, t, ", ,,  , S, y, n, c, L, M, S, t, u, d, i, o, W, e, b, s, o, c, k, e, t, ]):
    """Sync client session interfaces applicable to all API namespaces."""
    def __init__((self, client: "Client")) -> None:
        """Initialize synchronous API client session."""
    def _ensure_connected((self)) -> None:
    def __enter__((self)) -> Self:
    def __exit__((self, *args: Any)) -> None:

class DownloadedModel(
,  ,  ,  ,  , G, e, n, e, r, i, c, [, 
,  ,  ,  ,  ,  ,  ,  ,  , T, M, o, d, e, l, I, n, f, o, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, S, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, L, o, a, d, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , T, M, o, d, e, l, H, a, n, d, l, e, ,, 
,  ,  ,  ,  , ], ,, 
,  ,  ,  ,  , D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, B, a, s, e, [, T, M, o, d, e, l, I, n, f, o, ,,  , T, S, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ], ,, 
):

class DownloadedEmbeddingModel(
,  ,  ,  ,  , D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, M, o, d, e, l, I, n, f, o, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", S, y, n, c, S, e, s, s, i, o, n, E, m, b, e, d, d, i, n, g, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", E, m, b, e, d, d, i, n, g, M, o, d, e, l, ", ,, 
,  ,  ,  ,  , ], ,, 
):
    """Download listing for an embedding model."""
    def __init__((self, model_info: DictObject, session: "SyncSessionEmbedding")) -> None:
        """Initialize downloaded embedding model details."""

class DownloadedLlm(
,  ,  ,  ,  , D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, I, n, f, o, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", S, y, n, c, S, e, s, s, i, o, n, L, l, m, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, L, M, ", ,, 
,  ,  ,  ,  , ], 
):
    """Download listing for an LLM."""
    def __init__((self, model_info: DictObject, session: "SyncSessionLlm")) -> None:
        """Initialize downloaded embedding model details."""

class SyncSessionSystem(S, y, n, c, S, e, s, s, i, o, n):
    """Sync client session for the system namespace."""
    def _process_download_listing((self, model_info: DictObject)) -> AnyDownloadedModel:

class _SyncSessionFiles(S, y, n, c, S, e, s, s, i, o, n):
    """Sync client session for the files namespace."""
    def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:
    def _prepare_file((self, src: LocalFileInput, name: str | None = None)) -> FileHandle:
        """Add a file to the server. Returns a file handle for use in prediction requests."""

class ModelDownloadOption(M, o, d, e, l, D, o, w, n, l, o, a, d, O, p, t, i, o, n, B, a, s, e, [, S, y, n, c, S, e, s, s, i, o, n, ]):
    """A single download option for a model search result."""

class AvailableModel(A, v, a, i, l, a, b, l, e, M, o, d, e, l, B, a, s, e, [, S, y, n, c, S, e, s, s, i, o, n, ]):
    """A model available for download from the model repository."""

class SyncSessionRepository(S, y, n, c, S, e, s, s, i, o, n):
    """Sync client session for the repository namespace."""

class SyncSessionModel(
,  ,  ,  ,  , S, y, n, c, S, e, s, s, i, o, n, ,, 
,  ,  ,  ,  , G, e, n, e, r, i, c, [, T, M, o, d, e, l, H, a, n, d, l, e, ,,  , T, L, o, a, d, C, o, n, f, i, g, ,,  , T, L, o, a, d, C, o, n, f, i, g, D, i, c, t, ,,  , T, D, o, w, n, l, o, a, d, e, d, M, o, d, e, l, ], ,, 
):
    """Sync client session for a model (LLM/embedding) namespace."""
    def _get_load_config((self, model_specifier: AnyModelSpecifier)) -> AnyLoadConfig:
        """Get the model load config for the specified model."""
    def _get_api_model_info((self, model_specifier: AnyModelSpecifier)) -> Any:
        """Get the raw model info (if any) for a model matching the given criteria."""
    def _get_context_length((self, model_specifier: AnyModelSpecifier)) -> int:
        """Get the context length of the specified model."""
    def _count_tokens((self, model_specifier: AnyModelSpecifier, input: str)) -> int:
    def _tokenize_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[int]:
    def _tokenize((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[int] | Sequence[Sequence[int]]:
        """Tokenize the input string(s) using the specified model."""
    def _load_new_instance((
        self,
        model_key: str,
        instance_identifier: str | None,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TModelHandle:
    def _get_or_load((
        self,
        model_key: str,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TModelHandle:
        """Get the specified model if it is already loaded, otherwise load it."""
    def _get_any((self)) -> TModelHandle:
        """Get a handle to any loaded model."""
    def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:

class PredictionStream(P, r, e, d, i, c, t, i, o, n, S, t, r, e, a, m, B, a, s, e):
    """Sync context manager for an ongoing prediction process."""
    def __init__((
        self,
        channel_cm: SyncPredictionCM,
        endpoint: PredictionEndpoint,
    )) -> None:
        """Initialize a prediction process representation."""
    def __enter__((self)) -> Self:
    def __exit__((
        self,
        _exc_type: Type[BaseException] | None,
        exc_val: BaseException | None,
        _exc_tb: TracebackType | None,
    )) -> None:
    def __iter__((self)) -> Iterator[LlmPredictionFragment]:
    def _iter_events((self)) -> Iterator[PredictionRxEvent]:

class SyncSessionLlm(
,  ,  ,  ,  , S, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", L, L, M, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , D, o, w, n, l, o, a, d, e, d, L, l, m, ,, 
,  ,  ,  ,  , ], 
):
    """Sync client session for LLM namespace."""
    def __init__((self, client: "Client")) -> None:
        """Initialize API client session for LLM interaction."""
    def _create_handle((self, model_identifier: str)) -> "LLM":
        """Create a symbolic handle to the specified LLM model."""
    def _complete_stream((
        self,
        model_specifier: AnyModelSpecifier,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionStream:
        """Request a one-off prediction without any context and stream the generated tokens."""
    def _respond_stream((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionStream:
        """Request a response in an ongoing assistant chat session and stream the generated tokens."""
    def _apply_prompt_template((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        opts: LlmApplyPromptTemplateOpts | LlmApplyPromptTemplateOptsDict = {},
    )) -> str:
        """Apply a prompt template to the given history."""

class SyncSessionEmbedding(
,  ,  ,  ,  , S, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, [, 
,  ,  ,  ,  ,  ,  ,  ,  , ", E, m, b, e, d, d, i, n, g, M, o, d, e, l, ", ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, D, i, c, t, ,, 
,  ,  ,  ,  ,  ,  ,  ,  , D, o, w, n, l, o, a, d, e, d, E, m, b, e, d, d, i, n, g, M, o, d, e, l, ,, 
,  ,  ,  ,  , ], 
):
    """Sync client session for embedding namespace."""
    def __init__((self, client: "Client")) -> None:
        """Initialize API client session for embedding model interaction."""
    def _create_handle((self, model_identifier: str)) -> "EmbeddingModel":
        """Create a symbolic handle to the specified embedding model."""
    def _embed_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[float]:
    def _embed((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[float] | Sequence[Sequence[float]]:
        """Request embedding vectors for the given input string(s)."""

class SyncModelHandle(M, o, d, e, l, H, a, n, d, l, e, B, a, s, e, [, T, S, y, n, c, S, e, s, s, i, o, n, M, o, d, e, l, ]):
    """Reference to a loaded LM Studio model."""

class LLM(S, y, n, c, M, o, d, e, l, H, a, n, d, l, e, [, S, y, n, c, S, e, s, s, i, o, n, L, l, m, ]):
    """Reference to a loaded LLM model."""

class EmbeddingModel(S, y, n, c, M, o, d, e, l, H, a, n, d, l, e, [, S, y, n, c, S, e, s, s, i, o, n, E, m, b, e, d, d, i, n, g, ]):
    """Reference to a loaded embedding model."""

class Client(C, l, i, e, n, t, B, a, s, e):
    """Synchronous SDK client interface."""
    def __init__((self, api_host: str | None = None)) -> None:
        """Initialize API client."""
    def __enter__((self)) -> Self:
    def __exit__((self, *args: Any)) -> None:
    def close((self)) -> None:
        """Close any started client sessions."""
    def _get_session((self, cls: Type[TSyncSession])) -> TSyncSession:
        """Get the client session of the given type."""
    def _prepare_file((self, src: LocalFileInput, name: str | None = None)) -> FileHandle:
        """Add a file to the server. Returns a file handle for use in prediction requests."""

def __init__((
        self,
        channel_id: int,
        rx_queue: queue.Queue[Any],
        endpoint: ChannelEndpoint[T, Any, Any],
        send_json: Callable[[DictObject], None],
        log_context: LogEventContext,
    )) -> None:
    """Initialize synchronous websocket streaming channel."""

def get_creation_message((self)) -> DictObject:
    """Get the message to send to create this channel."""

def cancel((self)) -> None:
    """Cancel the channel."""

def rx_stream((
        self,
    )) -> Iterator[DictObject | None]:
    """Stream received channel messages until channel is closed by server."""

def wait_for_result((self)) -> T:
    """Wait for the channel to finish and return the result."""

def __init__((
        self,
        call_id: int,
        rx_queue: queue.Queue[Any],
        log_context: LogEventContext,
        notice_prefix: str = "RPC",
    )) -> None:
    """Initialize synchronous remote procedure call."""

def get_rpc_message((
        self, endpoint: str, params: AnyLMStudioStruct | None
    )) -> DictObject:
    """Get the message to send to initiate this remote procedure call."""

def receive_result((self)) -> Any:
    """Receive call response on the receive queue."""

def __init__((
        self,
        ws_thread: AsyncWebsocketThread,
        ws_url: str,
        auth_details: DictObject,
        log_context: LogEventContext | None = None,
    )) -> None:
    """Initialize synchronous websocket client."""

def _httpx_ws((self)) -> AsyncWebSocketSession | None:

def __enter__((self)) -> Self:

def __exit__((self, *args: Any)) -> None:

def connect((self)) -> Self:
    """Connect to and authenticate with the LM Studio API."""

def disconnect((self)) -> None:
    """Drop the LM Studio API connection."""

def _enqueue_message((self, message: Any)) -> bool:

def _notify_client_termination((self)) -> int:
    """Send None to all clients with open receive queues."""

def _send_json((self, message: DictObject)) -> None:

def _connect_to_endpoint((self, channel: SyncChannel[Any])) -> None:
    """Connect channel to specified endpoint."""

def open_channel((
        self,
        endpoint: ChannelEndpoint[T, Any, Any],
    )) -> Generator[SyncChannel[T], None, None]:
    """Open a streaming channel over the websocket."""

def _send_call((
        self,
        rpc: SyncRemoteCall,
        endpoint: str,
        params: AnyLMStudioStruct | None = None,
    )) -> None:
    """Initiate remote call to specified endpoint."""

def remote_call((
        self,
        endpoint: str,
        params: AnyLMStudioStruct | None,
        notice_prefix: str = "RPC",
    )) -> Any:
    """Make a remote procedure call over the websocket."""

def __init__((self, client: "Client")) -> None:
    """Initialize synchronous API client session."""

def _ensure_connected((self)) -> None:

def __enter__((self)) -> Self:

def __exit__((self, *args: Any)) -> None:

def connect((self)) -> SyncLMStudioWebsocket:
    """Connect the client session."""

def disconnect((self)) -> None:
    """Disconnect the client session."""

def _create_channel((
        self,
        endpoint: ChannelEndpoint[T, Any, Any],
    )) -> Generator[SyncChannel[T], None, None]:
    """Connect a channel to an LM Studio streaming endpoint."""

def remote_call((
        self,
        endpoint: str,
        params: AnyLMStudioStruct | None = None,
        notice_prefix: str = "RPC",
    )) -> Any:
    """Send a remote call to the given RPC endpoint and wait for the result."""

def load_new_instance((
        self,
        *,
        ttl: int | None = DEFAULT_TTL,
        instance_identifier: str | None = None,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TModelHandle:
    """Load this model with the given identifier and configuration."""

def model((
        self,
        *,
        ttl: int | None = DEFAULT_TTL,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TModelHandle:
    """Retrieve model with default identifier, or load it with given configuration."""

def __init__((self, model_info: DictObject, session: "SyncSessionEmbedding")) -> None:
    """Initialize downloaded embedding model details."""

def __init__((self, model_info: DictObject, session: "SyncSessionLlm")) -> None:
    """Initialize downloaded embedding model details."""

def list_downloaded_models((self)) -> Sequence[AnyDownloadedModel]:
    """Get the list of all downloaded models that are available for loading."""

def _process_download_listing((self, model_info: DictObject)) -> AnyDownloadedModel:

def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:

def _prepare_file((self, src: LocalFileInput, name: str | None = None)) -> FileHandle:
    """Add a file to the server. Returns a file handle for use in prediction requests."""

def prepare_image((self, src: LocalFileInput, name: str | None = None)) -> FileHandle:
    """Add an image to the server. Returns a file handle for use in prediction requests."""

def download((
        self,
        on_progress: DownloadProgressCallback | None = None,
        on_finalize: DownloadFinalizedCallback | None = None,
    )) -> str:
    """Download a model and get its path for loading."""

def get_download_options((
        self,
    )) -> Sequence[ModelDownloadOption]:
    """Get the download options for the specified model."""

def search_models((
        self,
        search_term: str | None = None,
        limit: int | None = None,
        compatibility_types: list[ModelCompatibilityType] | None = None,
    )) -> Sequence[AvailableModel]:
    """Search for downloadable models satisfying a search query."""

def _system_session((self)) -> SyncSessionSystem:

def _files_session((self)) -> _SyncSessionFiles:

def _get_load_config((self, model_specifier: AnyModelSpecifier)) -> AnyLoadConfig:
    """Get the model load config for the specified model."""

def _get_api_model_info((self, model_specifier: AnyModelSpecifier)) -> Any:
    """Get the raw model info (if any) for a model matching the given criteria."""

def get_model_info((self, model_specifier: AnyModelSpecifier)) -> ModelInstanceInfo:
    """Get the model info (if any) for a model matching the given criteria."""

def _get_context_length((self, model_specifier: AnyModelSpecifier)) -> int:
    """Get the context length of the specified model."""

def _count_tokens((self, model_specifier: AnyModelSpecifier, input: str)) -> int:

def _tokenize_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[int]:

def _tokenize((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[int] | Sequence[Sequence[int]]:
    """Tokenize the input string(s) using the specified model."""

def _create_handle((self, model_identifier: str)) -> TModelHandle:
    """Get a symbolic handle to the specified model."""

def model((
        self,
        model_key: str | None = None,
        /,
        *,
        ttl: int | None = DEFAULT_TTL,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TModelHandle:
    """Get a handle to the specified model (loading it if necessary)."""

def list_loaded((self)) -> Sequence[TModelHandle]:
    """Get the list of currently loaded models."""

def unload((self, model_identifier: str)) -> None:
    """Unload the specified model."""

def load_new_instance((
        self,
        model_key: str,
        instance_identifier: str | None = None,
        *,
        ttl: int | None = DEFAULT_TTL,
        config: TLoadConfig | TLoadConfigDict | None = None,
        on_load_progress: ModelLoadingCallback | None = None,
    )) -> TModelHandle:
    """Load the specified model with the given identifier and configuration."""

def _load_new_instance((
        self,
        model_key: str,
        instance_identifier: str | None,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TModelHandle:

def _get_or_load((
        self,
        model_key: str,
        ttl: int | None,
        config: TLoadConfig | TLoadConfigDict | None,
        on_load_progress: ModelLoadingCallback | None,
    )) -> TModelHandle:
    """Get the specified model if it is already loaded, otherwise load it."""

def _get_any((self)) -> TModelHandle:
    """Get a handle to any loaded model."""

def _is_relevant_model((cls, model: AnyDownloadedModel)) -> TypeIs[TDownloadedModel]:

def list_downloaded((self)) -> Sequence[TDownloadedModel]:
    """Get the list of currently downloaded models that are available for loading."""

def _fetch_file_handle((self, file_data: _LocalFileData)) -> FileHandle:

def __init__((
        self,
        channel_cm: SyncPredictionCM,
        endpoint: PredictionEndpoint,
    )) -> None:
    """Initialize a prediction process representation."""

def start((self)) -> None:
    """Send the prediction request."""

def close((self)) -> None:
    """Terminate the prediction processing (if not already terminated)."""

def __enter__((self)) -> Self:

def __exit__((
        self,
        _exc_type: Type[BaseException] | None,
        exc_val: BaseException | None,
        _exc_tb: TracebackType | None,
    )) -> None:

def __iter__((self)) -> Iterator[LlmPredictionFragment]:

def _iter_events((self)) -> Iterator[PredictionRxEvent]:

def wait_for_result((self)) -> PredictionResult:
    """Wait for the result of the prediction."""

def cancel((self)) -> None:
    """Cancel the prediction process."""

def __init__((self, client: "Client")) -> None:
    """Initialize API client session for LLM interaction."""

def _create_handle((self, model_identifier: str)) -> "LLM":
    """Create a symbolic handle to the specified LLM model."""

def _complete_stream((
        self,
        model_specifier: AnyModelSpecifier,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionStream:
    """Request a one-off prediction without any context and stream the generated tokens."""

def _respond_stream((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionStream:
    """Request a response in an ongoing assistant chat session and stream the generated tokens."""

def _apply_prompt_template((
        self,
        model_specifier: AnyModelSpecifier,
        history: Chat | ChatHistoryDataDict | str,
        opts: LlmApplyPromptTemplateOpts | LlmApplyPromptTemplateOptsDict = {},
    )) -> str:
    """Apply a prompt template to the given history."""

def __init__((self, client: "Client")) -> None:
    """Initialize API client session for embedding model interaction."""

def _create_handle((self, model_identifier: str)) -> "EmbeddingModel":
    """Create a symbolic handle to the specified embedding model."""

def _embed_text((
        self, model_specifier: AnyModelSpecifier, input: str
    )) -> Sequence[float]:

def _embed((
        self, model_specifier: AnyModelSpecifier, input: str | Iterable[str]
    )) -> Sequence[float] | Sequence[Sequence[float]]:
    """Request embedding vectors for the given input string(s)."""

def unload((self)) -> None:
    """Unload this model."""

def get_info((self)) -> ModelInstanceInfo:
    """Get the model info for this model."""

def get_load_config((self)) -> AnyLoadConfig:
    """Get the model load config for this model."""

def tokenize((
        self, input: str | Iterable[str]
    )) -> Sequence[int] | Sequence[Sequence[int]]:
    """Tokenize the input string(s) using this model."""

def count_tokens((self, input: str)) -> int:
    """Report the number of tokens needed for the input string using this model."""

def get_context_length((self)) -> int:
    """Get the context length of this model."""

def complete_stream((
        self,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionStream:
    """Request a one-off prediction without any context and stream the generated tokens."""

def complete((
        self,
        prompt: str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionResult:
    """Request a one-off prediction without any context."""

def respond_stream((
        self,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionStream:
    """Request a response in an ongoing assistant chat session and stream the generated tokens."""

def respond((
        self,
        history: Chat | ChatHistoryDataDict | str,
        *,
        response_format: ResponseSchema | None = None,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: PredictionMessageCallback | None = None,
        on_first_token: PredictionFirstTokenCallback | None = None,
        on_prediction_fragment: PredictionFragmentCallback | None = None,
        on_prompt_processing_progress: PromptProcessingCallback | None = None,
    )) -> PredictionResult:
    """Request a response in an ongoing assistant chat session."""

def act((
        self,
        chat: Chat | ChatHistoryDataDict | str,
        tools: Iterable[ToolDefinition],
        *,
        max_prediction_rounds: int | None = None,
        max_parallel_tool_calls: int | None = 1,
        config: LlmPredictionConfig | LlmPredictionConfigDict | None = None,
        preset: str | None = None,
        on_message: Callable[[AssistantResponse | ToolResultMessage], Any]
        | None = None,
        on_first_token: Callable[[int], Any] | None = None,
        on_prediction_fragment: Callable[[LlmPredictionFragment, int], Any]
        | None = None,
        on_round_start: Callable[[int], Any] | None = None,
        on_round_end: Callable[[int], Any] | None = None,
        on_prediction_completed: Callable[[PredictionRoundResult], Any] | None = None,
        on_prompt_processing_progress: Callable[[float, int], Any] | None = None,
        handle_invalid_tool_request: Callable[
            [LMStudioPredictionError, ToolCallRequest | None], str | None
        ]
        | None = None,
    )) -> ActResult:
    """Request a response (with implicit tool use) in an ongoing agent chat session."""

def _wrapped_on_first_token(()) -> None:

def _wrapped_on_prediction_fragment((
                fragment: LlmPredictionFragment,
            )) -> None:

def _wrapped_on_prompt_processing_progress((progress: float)) -> None:

def _finish_tool_call((fut: SyncFuture[Any])) -> Any:

def apply_prompt_template((
        self,
        history: Chat | ChatHistoryDataDict | str,
        opts: LlmApplyPromptTemplateOpts | LlmApplyPromptTemplateOptsDict = {},
    )) -> str:
    """Apply a prompt template to the given history."""

def embed((
        self, input: str | Iterable[str]
    )) -> Sequence[float] | Sequence[Sequence[float]]:
    """Request embedding vectors for the given input string(s)."""

def __init__((self, api_host: str | None = None)) -> None:
    """Initialize API client."""

def __enter__((self)) -> Self:

def __exit__((self, *args: Any)) -> None:

def close((self)) -> None:
    """Close any started client sessions."""

def _get_session((self, cls: Type[TSyncSession])) -> TSyncSession:
    """Get the client session of the given type."""

def llm((self)) -> SyncSessionLlm:
    """Return the LLM API client session."""

def embedding((self)) -> SyncSessionEmbedding:
    """Return the embedding model API client session."""

def system((self)) -> SyncSessionSystem:
    """Return the system API client session."""

def files((self)) -> _SyncSessionFiles:
    """Return the files API client session."""

def repository((self)) -> SyncSessionRepository:
    """Return the repository API client session."""

def _prepare_file((self, src: LocalFileInput, name: str | None = None)) -> FileHandle:
    """Add a file to the server. Returns a file handle for use in prediction requests."""

def prepare_image((self, src: LocalFileInput, name: str | None = None)) -> FileHandle:
    """Add an image to the server. Returns a file handle for use in prediction requests."""

def list_downloaded_models((
        self, namespace: str | None = None
    )) -> Sequence[AnyDownloadedModel]:
    """Get the list of downloaded models."""

def list_loaded_models((
        self, namespace: str | None = None
    )) -> Sequence[AnySyncModel]:
    """Get the list of loaded models using the default global client."""

def configure_default_client((api_host: str)) -> None:
    """Set the server API host for the default global client (without creating the client)."""

def get_default_client((api_host: str | None = None)) -> Client:
    """Get the default global client (creating it if necessary)."""

def _reset_default_client(()) -> None:

def llm((
    model_key: str | None = None,
    /,
    *,
    ttl: int | None = DEFAULT_TTL,
    config: LlmLoadModelConfig | LlmLoadModelConfigDict | None = None,
)) -> LLM:
    """Access an LLM using the default global client."""

def embedding_model((
    model_key: str | None = None,
    /,
    *,
    ttl: int | None = DEFAULT_TTL,
    config: EmbeddingLoadModelConfig | EmbeddingLoadModelConfigDict | None = None,
)) -> EmbeddingModel:
    """Access an embedding model using the default global client."""

def _prepare_file((src: LocalFileInput, name: str | None = None)) -> FileHandle:
    """Add a file to the server using the default global client."""

def prepare_image((src: LocalFileInput, name: str | None = None)) -> FileHandle:
    """Add an image to the server using the default global client."""

def list_downloaded_models((
    namespace: str | None = None,
)) -> Sequence[AnyDownloadedModel]:
    """Get the list of downloaded models using the default global client."""

def list_loaded_models((namespace: str | None = None)) -> Sequence[AnySyncModel]:
    """Get the list of loaded models using the default global client."""


<document index="20">
<source>tests/README.md</source>
<document_content>
# LM Studio Python SDK semi-automated test suite

The SDK test suite is currently only partially automated: the
tests need to be executed on a machine with the LM Studio
desktop application already running locally. If the test suite
is running on Windows under WSL, WSL must be running with mirrored
networking enabled (otherwise the test suite won't be able to
access the desktop app via the local loopback interface).

In addition to the desktop app being app and run, the following
conditions must also be met for the test suite to pass:

- the API server must be enabled and running on port 1234
- the following models model must be loaded with their default identifiers
  - `text-embedding-nomic-embed-text-v1.5` (text embedding model)
  - `llama-3.2-1b-instruct` (text LLM)
  - `ZiangWu/MobileVLM_V2-1.7B-GGUF` (visual LLM)
  - `qwen2.5-7b-instruct-1m` (tool using LLM)

Additional models should NOT be loaded when running the test suite,
as some model querying tests may fail in that case.

There are also some JIT model loading/unloading test cases which
expect `smollm2-135m` (small text LLM) to already be downloaded.
A full test run will download this model (since it is also the
model used for the end-to-end search-and-download test case).

There's no problem with having additional models downloaded.
The only impact is that the test that checks all of the expected
models can be found in the list of downloaded models will take a
little longer to run.


# Loading and unloading the required models

The `load-test-models` `tox` environment can be used to ensure the required
models are loaded *without* a time-to-live set:

```console
$ tox -m load-test-models
```

To ensure the test models are loaded with the config expected by the test suite,
any previously loaded instances are unloaded first.

There is also an `unload-test-models` `tox` environment that can be used to
explicitly unload the test models:

```console
$ tox -m unload-test-models
```

The model downloading test cases can be specifically run with:

```console
$ tox -m test -- -k test_download_model
```


## Adding new tests

Test files should follow the following naming conventions:

- `test_XYZ.py`: mix of async and sync test cases for `XYZ` that aren't amenable to automated conversion
  (for whatever reason; for example, `anyio.fail_after` has no sync counterpart)
- `async/test_XYZ_async.py` : async test cases for `XYZ` that are amenable to automated sync conversion;
  all test method names should also end in `_async`.
- `sync/test_XYZ_sync.py` : sync test cases auto-generated from `test_XYZ_async.py`

`python async2sync.py` will run the automated conversion (there are no external dependencies,
so there's no dedicated `tox` environment for this).

## Marking slow tests

`pytest` accepts a `--durations=N` option to print the "N" slowest tests (and their durations).

Any tests that consistently take more than 3 seconds to execute should be marked as slow. It's
also reasonable to mark any tests that take more than a second as slow.

Tests that are missing the marker can be identified via:

```
tox -m test -- --durations=10 -m "not slow"
```

Tests that have the marker but shouldn't can be identified via:

```
tox -m test -- --durations=0 -m "slow"
```

(the latter command prints the durations for all executed tests)

</document_content>
</document>

# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/__init__.py
# Language: python



# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/__init__.py
# Language: python



# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_embedding_async.py
# Language: python

import logging
import anyio
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import AsyncClient, EmbeddingLoadModelConfig, LMStudioModelNotFoundError
from ..support import (
    EXPECTED_EMBEDDING,
    EXPECTED_EMBEDDING_CONTEXT_LENGTH,
    EXPECTED_EMBEDDING_ID,
    EXPECTED_EMBEDDING_LENGTH,
    check_sdk_error,
)

def test_embedding_async((model_id: str, caplog: LogCap)) -> None:

def test_embedding_list_async((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_async((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_list_async((model_id: str, caplog: LogCap)) -> None:

def test_context_length_async((model_id: str, caplog: LogCap)) -> None:

def test_get_load_config_async((model_id: str, caplog: LogCap)) -> None:

def test_get_model_info_async((model_id: str, caplog: LogCap)) -> None:

def test_invalid_model_request_async((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_images_async.py
# Language: python

import logging
import pytest
from pytest import LogCaptureFixture as LogCap
from io import BytesIO
from lmstudio import AsyncClient, Chat, FileHandle, LMStudioServerError
from ..support import (
    EXPECTED_VLM_ID,
    IMAGE_FILEPATH,
    SHORT_PREDICTION_CONFIG,
    VLM_PROMPT,
    check_sdk_error,
)

def test_upload_from_pathlike_async((caplog: LogCap)) -> None:

def test_upload_from_file_obj_async((caplog: LogCap)) -> None:

def test_upload_from_bytesio_async((caplog: LogCap)) -> None:

def test_vlm_predict_async((caplog: LogCap)) -> None:

def test_non_vlm_predict_async((caplog: LogCap)) -> None:

def test_vlm_predict_image_param_async((caplog: LogCap)) -> None:

def test_non_vlm_predict_image_param_async((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_inference_async.py
# Language: python

import json
import logging
import anyio
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import (
    AssistantResponse,
    AsyncClient,
    AsyncPredictionStream,
    Chat,
    LlmInfo,
    LlmLoadModelConfig,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmPredictionFragment,
    LlmPredictionStats,
    LMStudioModelNotFoundError,
    LMStudioPresetNotFoundError,
    PredictionResult,
    ResponseSchema,
    TextData,
)
from ..support import (
    EXPECTED_LLM_ID,
    GBNF_GRAMMAR,
    PROMPT,
    RESPONSE_FORMATS,
    RESPONSE_SCHEMA,
    SCHEMA_FIELDS,
    SHORT_PREDICTION_CONFIG,
    check_sdk_error,
)

def test_respond_past_history_async((caplog: LogCap)) -> None:

def test_complete_nostream_async((caplog: LogCap)) -> None:

def test_complete_stream_async((caplog: LogCap)) -> None:

def test_complete_structured_response_format_async((
    format_type: ResponseSchema, caplog: LogCap
)) -> None:

def test_complete_structured_config_json_async((caplog: LogCap)) -> None:

def test_complete_structured_config_gbnf_async((caplog: LogCap)) -> None:

def test_callbacks_text_completion_async((caplog: LogCap)) -> None:

def progress_update((progress: float)) -> None:

def count_first_token_notification(()) -> None:

def record_fragment((fragment: LlmPredictionFragment)) -> None:

def test_callbacks_chat_response_async((caplog: LogCap)) -> None:

def progress_update((progress: float)) -> None:

def count_first_token_notification(()) -> None:

def record_fragment((fragment: LlmPredictionFragment)) -> None:

def test_complete_prediction_metadata_async((caplog: LogCap)) -> None:

def test_invalid_model_request_nostream_async((caplog: LogCap)) -> None:

def test_invalid_model_request_stream_async((caplog: LogCap)) -> None:

def test_invalid_preset_request_nostream_async((caplog: LogCap)) -> None:

def test_invalid_preset_request_stream_async((caplog: LogCap)) -> None:

def test_cancel_prediction_async((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_llm_async.py
# Language: python

import logging
import anyio
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import (
    AsyncClient,
    LlmLoadModelConfig,
    LMStudioModelNotFoundError,
    history,
)
from ..support import EXPECTED_LLM, EXPECTED_LLM_ID, check_sdk_error

def test_apply_prompt_template_async((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_async((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_list_async((model_id: str, caplog: LogCap)) -> None:

def test_context_length_async((model_id: str, caplog: LogCap)) -> None:

def test_get_load_config_async((model_id: str, caplog: LogCap)) -> None:

def test_get_model_info_async((model_id: str, caplog: LogCap)) -> None:

def test_invalid_model_request_async((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_model_catalog_async.py
# Language: python

import logging
from contextlib import suppress
import anyio
import pytest
from pytest import LogCaptureFixture as LogCap
from pytest_subtests import SubTests
from lmstudio import AsyncClient, LMStudioModelNotFoundError, LMStudioServerError
from lmstudio.json_api import DownloadedModelBase, ModelHandleBase
from ..support import (
    LLM_LOAD_CONFIG,
    EXPECTED_LLM,
    EXPECTED_LLM_ID,
    EXPECTED_EMBEDDING,
    EXPECTED_EMBEDDING_ID,
    EXPECTED_VLM_ID,
    SMALL_LLM_ID,
    TOOL_LLM_ID,
    check_sdk_error,
)

def test_list_downloaded_llm_async((caplog: LogCap, subtests: SubTests)) -> None:

def test_list_downloaded_embedding_async((
    caplog: LogCap, subtests: SubTests
)) -> None:

def test_list_downloaded_models_async((caplog: LogCap, subtests: SubTests)) -> None:

def test_list_loaded_llm_async((caplog: LogCap)) -> None:

def test_list_loaded_embedding_async((caplog: LogCap)) -> None:

def test_load_duplicate_llm_async((caplog: LogCap)) -> None:

def test_load_duplicate_embedding_async((caplog: LogCap)) -> None:

def test_get_model_llm_async((caplog: LogCap)) -> None:

def test_get_model_embedding_async((caplog: LogCap)) -> None:

def test_get_any_model_llm_async((caplog: LogCap)) -> None:

def test_get_any_model_embedding_async((caplog: LogCap)) -> None:

def test_invalid_unload_request_llm_async((caplog: LogCap)) -> None:

def test_invalid_unload_request_embedding_async((caplog: LogCap)) -> None:

def test_get_or_load_when_loaded_llm_async((caplog: LogCap)) -> None:

def test_get_or_load_when_loaded_embedding_async((caplog: LogCap)) -> None:

def test_get_or_load_when_unloaded_llm_async((caplog: LogCap)) -> None:

def test_get_or_load_when_unloaded_embedding_async((caplog: LogCap)) -> None:

def test_jit_unloading_async((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_model_handles_async.py
# Language: python

import logging
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import AsyncClient, PredictionResult
from ..support import (
    EXPECTED_EMBEDDING,
    EXPECTED_EMBEDDING_ID,
    EXPECTED_EMBEDDING_LENGTH,
    EXPECTED_LLM,
    EXPECTED_LLM_ID,
    SHORT_PREDICTION_CONFIG,
)

def test_completion_llm_handle_async((model_id: str, caplog: LogCap)) -> None:

def test_embedding_handle_async((model_id: str, caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_repository_async.py
# Language: python

import logging
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import AsyncClient, LMStudioClientError
from ..support import SMALL_LLM_SEARCH_TERM

def test_download_model_async((caplog: LogCap)) -> None:

def test_get_options_out_of_session_async((caplog: LogCap)) -> None:

def test_download_out_of_session_async((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async/test_sdk_bypass_async.py
# Language: python

import logging
import uuid
import warnings
from typing import Any, AsyncContextManager
import pytest
from httpx_ws import aconnect_ws, AsyncWebSocketSession

def test_connect_and_predict_async((caplog: Any)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/async2sync.py
# Language: python

import re
import subprocess
from pathlib import Path
from os.path import commonpath

def convert_file((input_file: Path, sync_dir: Path)) -> None:

def main(()) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/conftest.py
# Language: python

import pytest


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/load_models.py
# Language: python

import asyncio
from contextlib import contextmanager
from typing import Generator
import lmstudio as lms
from .support import (
    EXPECTED_EMBEDDING_ID,
    EXPECTED_LLM_ID,
    EXPECTED_VLM_ID,
    LLM_LOAD_CONFIG,
    TOOL_LLM_ID,
)
from .unload_models import unload_models

def print_load_result((model_identifier: str)) -> Generator[None, None, None]:

def _load_llm((client: lms.AsyncClient, model_identifier: str)) -> None:

def _load_embedding_model((client: lms.AsyncClient, model_identifier: str)) -> None:

def reload_models(()) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/support/__init__.py
# Language: python

import sys
from contextlib import closing, contextmanager
from pathlib import Path
from typing import Generator
from typing_extensions import (
    # Native in 3.11+
    Never,
    NoReturn,
)
import pytest
from lmstudio import (
    BaseModel,
    DictObject,
    DictSchema,
    LlmLoadModelConfig,
    LMStudioServerError,
    LMStudioChannelClosedError,
)
from lmstudio.json_api import ChannelEndpoint
from lmstudio._sdk_models import LlmPredictionConfigDict, LlmStructuredPredictionSetting
from .lmstudio import ErrFunc
from socketserver import TCPServer, BaseRequestHandler
import socket

class OtherResponseFormat:

class LMStudioResponseFormat(B, a, s, e, M, o, d, e, l):

class InvalidEndpoint(C, h, a, n, n, e, l, E, n, d, p, o, i, n, t, [, s, t, r, ,,  , N, e, v, e, r, ,,  , d, i, c, t, [, s, t, r, ,,  , o, b, j, e, c, t, ], ]):
    def __init__((self)) -> None:
    def iter_message_events((self, _contents: DictObject | None)) -> NoReturn:
    def handle_rx_event((self, _event: Never)) -> None:

def model_json_schema((cls)) -> DictSchema:

def __init__((self)) -> None:

def iter_message_events((self, _contents: DictObject | None)) -> NoReturn:

def handle_rx_event((self, _event: Never)) -> None:

def nonresponsive_api_host(()) -> Generator[str, None, None]:
    """Open a listening TCP port on localhost and ignore all requests."""

def find_free_local_port(()) -> int:
    """Get a local TCP port with no listener at the time of the call."""

def closed_api_host(()) -> str:
    """Get a local API host address with no listener at the time of the call."""

def check_sdk_error((
    exc_info: pytest.ExceptionInfo[BaseException],
    calling_file: str,
    *,
    sdk_frames: int = 0,
    check_exc: bool = True,
)) -> None:

def check_unfiltered_error((
    exc_info: pytest.ExceptionInfo[BaseException],
    calling_file: str,
    err_func: ErrFunc,
)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/support/lmstudio/__init__.py
# Language: python

from pathlib import Path
from typing import AsyncGenerator, Callable, Coroutine, Generator, NoReturn, TypeAlias
from lmstudio import LMStudioError
from lmstudio.sdk_api import sdk_public_api, sdk_public_api_async, sdk_public_type

class InternalIterator:
    def __init__((self, err_func: ErrFunc)) -> None:

class AsyncInternalIterator(I, n, t, e, r, n, a, l, I, t, e, r, a, t, o, r):
    def __aiter__((self)) -> AsyncGenerator[None, NoReturn]:

class SyncInternalIterator(I, n, t, e, r, n, a, l, I, t, e, r, a, t, o, r):
    def __iter__((self)) -> Generator[None, None, NoReturn]:

class PublicClass:
    def internal_method((self, err_func: ErrFunc)) -> NoReturn:

def raise_sdk_error(()) -> NoReturn:

def raise_external_error(()) -> NoReturn:

def raise_internal_error(()) -> NoReturn:

def internal_func((err_func: ErrFunc)) -> NoReturn:

def public_func((err_func: ErrFunc)) -> NoReturn:

def public_wrapper_func((err_func: ErrFunc)) -> NoReturn:

def __init__((self, err_func: ErrFunc)) -> None:

def __aiter__((self)) -> AsyncGenerator[None, NoReturn]:

def __iter__((self)) -> Generator[None, None, NoReturn]:

def public_iter_wrapper((err_func: ErrFunc)) -> None:

def public_coroutine((err_func: ErrFunc)) -> NoReturn:

def public_wrapper_coroutine((err_func: ErrFunc)) -> NoReturn:

def public_asynciter_wrapper((err_func: ErrFunc)) -> None:

def internal_method((self, err_func: ErrFunc)) -> NoReturn:

def public_method((self, err_func: ErrFunc)) -> NoReturn:

def public_wrapper_method((self, err_func: ErrFunc)) -> NoReturn:

def public_iter_wrapper_method((self, err_func: ErrFunc)) -> None:

def public_async_method((self, err_func: ErrFunc)) -> NoReturn:

def public_async_wrapper_method((self, err_func: ErrFunc)) -> NoReturn:

def public_asynciter_wrapper_method((self, err_func: ErrFunc)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/__init__.py
# Language: python



# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_embedding_sync.py
# Language: python

import logging
from contextlib import nullcontext
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import Client, EmbeddingLoadModelConfig, LMStudioModelNotFoundError
from ..support import (
    EXPECTED_EMBEDDING,
    EXPECTED_EMBEDDING_CONTEXT_LENGTH,
    EXPECTED_EMBEDDING_ID,
    EXPECTED_EMBEDDING_LENGTH,
    check_sdk_error,
)

def test_embedding_sync((model_id: str, caplog: LogCap)) -> None:

def test_embedding_list_sync((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_sync((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_list_sync((model_id: str, caplog: LogCap)) -> None:

def test_context_length_sync((model_id: str, caplog: LogCap)) -> None:

def test_get_load_config_sync((model_id: str, caplog: LogCap)) -> None:

def test_get_model_info_sync((model_id: str, caplog: LogCap)) -> None:

def test_invalid_model_request_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_images_sync.py
# Language: python

import logging
import pytest
from pytest import LogCaptureFixture as LogCap
from io import BytesIO
from lmstudio import Client, Chat, FileHandle, LMStudioServerError
from ..support import (
    EXPECTED_VLM_ID,
    IMAGE_FILEPATH,
    SHORT_PREDICTION_CONFIG,
    VLM_PROMPT,
    check_sdk_error,
)

def test_upload_from_pathlike_sync((caplog: LogCap)) -> None:

def test_upload_from_file_obj_sync((caplog: LogCap)) -> None:

def test_upload_from_bytesio_sync((caplog: LogCap)) -> None:

def test_vlm_predict_sync((caplog: LogCap)) -> None:

def test_non_vlm_predict_sync((caplog: LogCap)) -> None:

def test_vlm_predict_image_param_sync((caplog: LogCap)) -> None:

def test_non_vlm_predict_image_param_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_inference_sync.py
# Language: python

import json
import logging
from contextlib import nullcontext
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import (
    AssistantResponse,
    Client,
    PredictionStream,
    Chat,
    LlmInfo,
    LlmLoadModelConfig,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmPredictionFragment,
    LlmPredictionStats,
    LMStudioModelNotFoundError,
    LMStudioPresetNotFoundError,
    PredictionResult,
    ResponseSchema,
    TextData,
)
from ..support import (
    EXPECTED_LLM_ID,
    GBNF_GRAMMAR,
    PROMPT,
    RESPONSE_FORMATS,
    RESPONSE_SCHEMA,
    SCHEMA_FIELDS,
    SHORT_PREDICTION_CONFIG,
    check_sdk_error,
)

def test_respond_past_history_sync((caplog: LogCap)) -> None:

def test_complete_nostream_sync((caplog: LogCap)) -> None:

def test_complete_stream_sync((caplog: LogCap)) -> None:

def test_complete_structured_response_format_sync((
    format_type: ResponseSchema, caplog: LogCap
)) -> None:

def test_complete_structured_config_json_sync((caplog: LogCap)) -> None:

def test_complete_structured_config_gbnf_sync((caplog: LogCap)) -> None:

def test_callbacks_text_completion_sync((caplog: LogCap)) -> None:

def progress_update((progress: float)) -> None:

def count_first_token_notification(()) -> None:

def record_fragment((fragment: LlmPredictionFragment)) -> None:

def test_callbacks_chat_response_sync((caplog: LogCap)) -> None:

def progress_update((progress: float)) -> None:

def count_first_token_notification(()) -> None:

def record_fragment((fragment: LlmPredictionFragment)) -> None:

def test_complete_prediction_metadata_sync((caplog: LogCap)) -> None:

def test_invalid_model_request_nostream_sync((caplog: LogCap)) -> None:

def test_invalid_model_request_stream_sync((caplog: LogCap)) -> None:

def test_invalid_preset_request_nostream_sync((caplog: LogCap)) -> None:

def test_invalid_preset_request_stream_sync((caplog: LogCap)) -> None:

def test_cancel_prediction_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_llm_sync.py
# Language: python

import logging
from contextlib import nullcontext
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import (
    Client,
    LlmLoadModelConfig,
    LMStudioModelNotFoundError,
    history,
)
from ..support import EXPECTED_LLM, EXPECTED_LLM_ID, check_sdk_error

def test_apply_prompt_template_sync((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_sync((model_id: str, caplog: LogCap)) -> None:

def test_tokenize_list_sync((model_id: str, caplog: LogCap)) -> None:

def test_context_length_sync((model_id: str, caplog: LogCap)) -> None:

def test_get_load_config_sync((model_id: str, caplog: LogCap)) -> None:

def test_get_model_info_sync((model_id: str, caplog: LogCap)) -> None:

def test_invalid_model_request_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_model_catalog_sync.py
# Language: python

import logging
from contextlib import nullcontext
from contextlib import suppress
import pytest
from pytest import LogCaptureFixture as LogCap
from pytest_subtests import SubTests
from lmstudio import Client, LMStudioModelNotFoundError, LMStudioServerError
from lmstudio.json_api import DownloadedModelBase, ModelHandleBase
from ..support import (
    LLM_LOAD_CONFIG,
    EXPECTED_LLM,
    EXPECTED_LLM_ID,
    EXPECTED_EMBEDDING,
    EXPECTED_EMBEDDING_ID,
    EXPECTED_VLM_ID,
    SMALL_LLM_ID,
    TOOL_LLM_ID,
    check_sdk_error,
)

def test_list_downloaded_llm_sync((caplog: LogCap, subtests: SubTests)) -> None:

def test_list_downloaded_embedding_sync((caplog: LogCap, subtests: SubTests)) -> None:

def test_list_downloaded_models_sync((caplog: LogCap, subtests: SubTests)) -> None:

def test_list_loaded_llm_sync((caplog: LogCap)) -> None:

def test_list_loaded_embedding_sync((caplog: LogCap)) -> None:

def test_load_duplicate_llm_sync((caplog: LogCap)) -> None:

def test_load_duplicate_embedding_sync((caplog: LogCap)) -> None:

def test_get_model_llm_sync((caplog: LogCap)) -> None:

def test_get_model_embedding_sync((caplog: LogCap)) -> None:

def test_get_any_model_llm_sync((caplog: LogCap)) -> None:

def test_get_any_model_embedding_sync((caplog: LogCap)) -> None:

def test_invalid_unload_request_llm_sync((caplog: LogCap)) -> None:

def test_invalid_unload_request_embedding_sync((caplog: LogCap)) -> None:

def test_get_or_load_when_loaded_llm_sync((caplog: LogCap)) -> None:

def test_get_or_load_when_loaded_embedding_sync((caplog: LogCap)) -> None:

def test_get_or_load_when_unloaded_llm_sync((caplog: LogCap)) -> None:

def test_get_or_load_when_unloaded_embedding_sync((caplog: LogCap)) -> None:

def test_jit_unloading_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_model_handles_sync.py
# Language: python

import logging
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import Client, PredictionResult
from ..support import (
    EXPECTED_EMBEDDING,
    EXPECTED_EMBEDDING_ID,
    EXPECTED_EMBEDDING_LENGTH,
    EXPECTED_LLM,
    EXPECTED_LLM_ID,
    SHORT_PREDICTION_CONFIG,
)

def test_completion_llm_handle_sync((model_id: str, caplog: LogCap)) -> None:

def test_embedding_handle_sync((model_id: str, caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_repository_sync.py
# Language: python

import logging
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import Client, LMStudioClientError
from ..support import SMALL_LLM_SEARCH_TERM

def test_download_model_sync((caplog: LogCap)) -> None:

def test_get_options_out_of_session_sync((caplog: LogCap)) -> None:

def test_download_out_of_session_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/sync/test_sdk_bypass_sync.py
# Language: python

import logging
import uuid
import warnings
from typing import Any, ContextManager
import pytest
from httpx_ws import connect_ws, WebSocketSession

def test_connect_and_predict_sync((caplog: Any)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_basics.py
# Language: python

import builtins
import sys
from importlib.metadata import version as pkg_version
from typing import Any, FrozenSet, Iterator, Set, Type
import pytest
from msgspec import Struct
import lmstudio
import lmstudio.json_api

def test_python_api_version(()) -> None:

def _find_unknown_numbered_schemas((schema_names: Set[str])) -> FrozenSet[str]:

def test_no_automatic_schema_numbering(()) -> None:

def _get_public_exceptions(()) -> Iterator[Type[BaseException]]:

def test_public_exceptions((exc_type: Type[BaseException])) -> None:

def _get_public_callables(()) -> Iterator[Any]:

def test_public_callables((api_call: Any)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_convenience_api.py
# Language: python

import lmstudio as lms
import pytest
from .support import (
    EXPECTED_EMBEDDING_ID,
    EXPECTED_LLM_ID,
    EXPECTED_VLM_ID,
    IMAGE_FILEPATH,
    TOOL_LLM_ID,
    closed_api_host,
)

def test_get_default_client(()) -> None:

def test_configure_default_client(()) -> None:

def test_llm_any(()) -> None:

def test_llm_specific((model_id: str)) -> None:

def test_embedding_any(()) -> None:

def test_embedding_specific(()) -> None:

def test_prepare_file(()) -> None:

def test_prepare_image(()) -> None:

def test_list_downloaded_models(()) -> None:

def test_list_loaded_models(()) -> None:

def test_list_loaded_embedding_models(()) -> None:

def test_list_loaded_LLMs(()) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_history.py
# Language: python

import copy
import json
from typing import Callable, cast
import pytest
from lmstudio.sdk_api import LMStudioOSError
from lmstudio.schemas import DictObject
from lmstudio.history import (
    AnyChatMessageDict,
    AnyChatMessageInput,
    AssistantMultiPartInput,
    Chat,
    ChatHistoryData,
    ChatHistoryDataDict,
    LocalFileInput,
    FileHandle,
    _FileHandleCache,
    FileHandleDict,
    _LocalFileData,
    TextData,
)
from lmstudio.json_api import (
    LlmInfo,
    LlmLoadModelConfig,
    LlmPredictionConfig,
    LlmPredictionStats,
    PredictionResult,
)
from lmstudio._sdk_models import (
    ToolCallRequestDataDict,
    ToolCallResultDataDict,
)
from .support import IMAGE_FILEPATH, check_sdk_error

def test_from_history(()) -> None:

def test_from_history_with_simple_text(()) -> None:

def test_get_history(()) -> None:

def test_add_entry(()) -> None:

def test_append(()) -> None:

def test_add_entries_dict_content(()) -> None:

def test_add_entries_tuple_content(()) -> None:

def test_add_entries_class_content(()) -> None:

def _make_prediction_result((data: str | DictObject)) -> PredictionResult:

def test_add_prediction_results(()) -> None:

def _add_file((file_data: _LocalFileData, identifier: str)) -> FileHandle:

def _check_pending_file((file_handle: FileHandle, name: str)) -> None:

def _check_fetched_text_file((
    file_handle: FileHandle, name: str, identifier: str
)) -> None:

def _make_local_file_cache(()) -> tuple[_FileHandleCache, list[FileHandle], int]:

def test_file_handle_cache(()) -> None:

def add_file((file_data: _LocalFileData)) -> FileHandle:

def test_file_handle_cache_async(()) -> None:

def add_file((file_data: _LocalFileData)) -> FileHandle:

def test_invalid_local_file(()) -> None:

def test_user_message_attachments(()) -> None:

def test_assistant_responses_cannot_be_multipart_or_consecutive(()) -> None:

def test_system_prompts_cannot_be_multipart_or_consecutive(()) -> None:

def test_system_prompts_cannot_be_file_handles(()) -> None:

def test_initial_history_with_prompt_is_disallowed(()) -> None:

def test_chat_display(()) -> None:

def test_chat_duplication((clone: Callable[[Chat], Chat])) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_inference.py
# Language: python

import asyncio
import logging
from typing import Any
import pytest
from pytest import LogCaptureFixture as LogCap
from pytest_subtests import SubTests
from lmstudio import (
    AsyncClient,
    Chat,
    Client,
    LlmPredictionConfig,
    LlmPredictionFragment,
    LMStudioPredictionError,
    LMStudioValueError,
    PredictionResult,
    PredictionRoundResult,
    ToolCallRequest,
    ToolFunctionDef,
    ToolFunctionDefDict,
)
from lmstudio.json_api import ChatResponseEndpoint
from lmstudio._sdk_models import LlmToolParameters
from .support import (
    EXPECTED_LLM_ID,
    MAX_PREDICTED_TOKENS,
    SHORT_PREDICTION_CONFIG,
    TOOL_LLM_ID,
)

def test_prediction_config_translation(()) -> None:

def test_concurrent_predictions((caplog: LogCap, subtests: SubTests)) -> None:

def _request_response(()) -> PredictionResult:

def log_adding_two_integers((a: int, b: int)) -> int:
    """Log adding two integers together."""

def test_tool_def_from_callable(()) -> None:

def test_parse_tools(()) -> None:

def test_duplicate_tool_names_rejected(()) -> None:

def test_tool_using_agent((caplog: LogCap)) -> None:

def test_tool_using_agent_callbacks((caplog: LogCap)) -> None:

def _append_fragment((f: LlmPredictionFragment, round_index: int)) -> None:

def divide((numerator: float, denominator: float)) -> float:
    """Divide the given numerator by the given denominator. Return the result."""

def test_tool_using_agent_error_handling((caplog: LogCap)) -> None:

def _handle_invalid_request((
            exc: LMStudioPredictionError, request: ToolCallRequest | None
        )) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_kv_config.py
# Language: python

from copy import deepcopy
from typing import Any, Iterator, cast, get_args
import msgspec
import pytest
from lmstudio import BaseModel, DictObject, LMStudioValueError
from lmstudio.schemas import LMStudioStruct
from lmstudio._kv_config import (
    ToServerKeymap,
    TO_SERVER_LOAD_EMBEDDING,
    TO_SERVER_LOAD_LLM,
    TO_SERVER_PREDICTION,
    load_config_to_kv_config_stack,
    parse_server_config,
    prediction_config_to_kv_config_stack,
)
from lmstudio._sdk_models import (
    EmbeddingLoadModelConfig,
    EmbeddingLoadModelConfigDict,
    GpuSetting,
    GpuSettingDict,
    GpuSplitConfigDict,
    KvConfigFieldDict,
    KvConfigStackDict,
    LlmLoadModelConfig,
    LlmLoadModelConfigDict,
    LlmPredictionConfig,
    LlmPredictionConfigDict,
    LlmSplitStrategy,
)

class GpuSettingStrict(G, p, u, S, e, t, t, i, n, g, ,,  , f, o, r, b, i, d, _, u, n, k, n, o, w, n, _, f, i, e, l, d, s, =, T, r, u, e):

class EmbeddingLoadModelConfigStrict(
,  ,  ,  ,  , E, m, b, e, d, d, i, n, g, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,,  , f, o, r, b, i, d, _, u, n, k, n, o, w, n, _, f, i, e, l, d, s, =, T, r, u, e, 
):

class LlmLoadModelConfigStrict(L, l, m, L, o, a, d, M, o, d, e, l, C, o, n, f, i, g, ,,  , f, o, r, b, i, d, _, u, n, k, n, o, w, n, _, f, i, e, l, d, s, =, T, r, u, e):

class LlmPredictionConfigStrict(L, l, m, P, r, e, d, i, c, t, i, o, n, C, o, n, f, i, g, ,,  , f, o, r, b, i, d, _, u, n, k, n, o, w, n, _, f, i, e, l, d, s, =, T, r, u, e):

def test_struct_field_coverage((
    config_dict: DictObject, config_type: LMStudioStruct[Any]
)) -> None:

def test_snake_case_conversion((
    input_dict: DictObject, expected_dict: DictObject, config_type: LMStudioStruct[Any]
)) -> None:

def test_kv_stack_field_coverage((
    keymap: ToServerKeymap, config_type: LMStudioStruct[Any]
)) -> None:

def test_kv_stack_load_config_embedding((config_dict: DictObject)) -> None:

def test_kv_stack_load_config_llm((config_dict: DictObject)) -> None:

def test_parse_server_config_load_embedding(()) -> None:

def test_parse_server_config_load_llm(()) -> None:

def _gpu_split_strategies(()) -> Iterator[LlmSplitStrategy]:

def _find_config_field((
    stack_dict: KvConfigStackDict, key: str
)) -> tuple[int, KvConfigFieldDict]:

def _del_config_field((stack_dict: KvConfigStackDict, key: str)) -> None:

def _find_config_value((stack_dict: KvConfigStackDict, key: str)) -> Any:

def _append_invalid_config_field((stack_dict: KvConfigStackDict, key: str)) -> None:

def test_gpu_split_strategy_config((split_strategy: LlmSplitStrategy)) -> None:

def test_kv_stack_prediction_config((config_dict: DictObject)) -> None:

def test_kv_stack_prediction_config_conflict(()) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_logging.py
# Language: python

import logging
import anyio
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import AsyncClient
from .support import InvalidEndpoint

def test_invalid_endpoint_request_stream((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_schemas.py
# Language: python

from typing import Any, Type
import pytest
from lmstudio import AnyModelSpecifier, ModelQuery, ModelQueryDict
from lmstudio.schemas import _snake_case_keys_to_camelCase, LMStudioStruct
from lmstudio.json_api import (
    _model_spec_to_api_dict,
    ModelSessionTypes,
    ModelTypesEmbedding,
    ModelTypesLlm,
)
from lmstudio._sdk_models import (
    ModelSpecifierInstanceReference,
    ModelSpecifierInstanceReferenceDict,
    ModelSpecifierQuery,
    ModelSpecifierQueryDict,
)
from .support import EXPECTED_LLM_ID

class Example(L, M, S, t, u, d, i, o, S, t, r, u, c, t, [, d, i, c, t, [, s, t, r, ,,  , s, t, r,  , |,  , i, n, t, ], ]):

def test_lists_of_lists_rejected(()) -> None:

def test_data_cycles_rejected(()) -> None:

def test_struct_display(()) -> None:

def test_model_query_specifiers((model_spec: AnyModelSpecifier)) -> None:

def test_model_instance_references((model_spec: AnyModelSpecifier)) -> None:

def test_model_session_types((api_types: Type[ModelSessionTypes[Any]])) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_session_errors.py
# Language: python

import logging
from typing import cast
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import (
    AsyncClient,
    LMStudioWebsocketError,
    Client,
)
from lmstudio.async_api import (
    AsyncSession,
    AsyncSessionSystem,
)
from lmstudio.sync_api import (
    SyncLMStudioWebsocket,
    SyncSession,
    SyncSessionSystem,
)
from .support import (
    EXPECT_TB_TRUNCATION,
    InvalidEndpoint,
    nonresponsive_api_host,
    closed_api_host,
    check_sdk_error,
    check_unfiltered_error,
)
from .support.lmstudio import ErrFunc

def check_call_errors_async((session: AsyncSession)) -> None:

def test_session_not_started_async((caplog: LogCap)) -> None:

def test_session_disconnected_async((caplog: LogCap)) -> None:

def test_session_closed_port_async((caplog: LogCap)) -> None:

def test_session_nonresponsive_port_async((caplog: LogCap)) -> None:

def check_call_errors_sync((session: SyncSession)) -> None:

def test_session_closed_port_sync((caplog: LogCap)) -> None:

def test_session_nonresponsive_port_sync((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_sessions.py
# Language: python

import logging
from typing import Generator
import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import (
    AsyncClient,
    Client,
    LMStudioWebsocketError,
)
from lmstudio.async_api import (
    AsyncLMStudioWebsocket,
    AsyncSession,
    AsyncSessionSystem,
)
from lmstudio.sync_api import (
    SyncLMStudioWebsocket,
    SyncSession,
    SyncSessionSystem,
)
from lmstudio._ws_impl import AsyncWebsocketThread
from .support import LOCAL_API_HOST

def check_connected_async_session((session: AsyncSession)) -> None:

def test_session_cm_async((caplog: LogCap)) -> None:

def check_connected_sync_session((session: SyncSession)) -> None:

def test_session_cm_sync((caplog: LogCap)) -> None:

def test_implicit_connection_sync((caplog: LogCap)) -> None:

def test_implicit_reconnection_sync((caplog: LogCap)) -> None:

def test_websocket_cm_async((caplog: LogCap)) -> None:

def ws_thread(()) -> Generator[AsyncWebsocketThread, None, None]:

def test_websocket_cm_sync((ws_thread: AsyncWebsocketThread, caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/test_traceback_filtering.py
# Language: python

import pytest
from pytest import LogCaptureFixture as LogCap
from lmstudio import LMStudioError
from lmstudio.sdk_api import sdk_callback_invocation
from lmstudio._logging import new_logger
from .support import check_sdk_error, check_unfiltered_error
from .support.lmstudio import (
    TestCoro,
    TestFunc,
    SYNC_API,
    ASYNC_API,
    raise_external_error,
    raise_internal_error,
    raise_sdk_error,
)

def test_sync_api_truncation_sdk_error((public_api: TestFunc)) -> None:

def test_sync_api_truncation_external_error((public_api: TestFunc)) -> None:

def test_sync_api_truncation_internal_error((public_api: TestFunc)) -> None:

def test_async_api_truncation_sdk_error((public_api: TestCoro)) -> None:

def test_async_api_truncation_external_error((public_api: TestCoro)) -> None:

def test_async_api_truncation_internal_error((public_api: TestCoro)) -> None:

def test_callback_invocation((caplog: LogCap)) -> None:


# File: /Users/Shared/lmstudio/lmstrix/ref/lmstudio-python/tests/unload_models.py
# Language: python

import asyncio
import lmstudio as lms
from .support import (
    EXPECTED_EMBEDDING_ID,
    EXPECTED_LLM_ID,
    EXPECTED_VLM_ID,
    TOOL_LLM_ID,
)

def _unload_model((session: AsyncSessionModel, model_identifier: str)) -> None:

def unload_models(()) -> None:


<document index="21">
<source>tox.ini</source>
<document_content>
[tox]
env_list = py{3.10,3.11,3.12,3.13},format,lint,typecheck
skip_missing_interpreters = False
isolated_build = True
labels =
    test = py3.12
    test_oldest = py3.10
    test_latest = py3.13
    test_all = py{3.10,3.11,3.12,3.13}
    static = lint,typecheck
    check = lint,typecheck,py3.12

[testenv]
# Multi-env performance tweak based on https://hynek.me/articles/turbo-charge-tox/
package = wheel
wheel_build_env = .pkg
groups = dev
allowlist_externals = pytest
passenv =
    CI
    LMS_*
commands =
    # Even the "slow" tests aren't absurdly slow, so default to running them
    pytest {posargs} tests/

[testenv:load-test-models]
commands =
    python -W "ignore:Note the async API is not yet stable:FutureWarning" -m tests.load_models

[testenv:unload-test-models]
commands =
    python -W "ignore:Note the async API is not yet stable:FutureWarning" -m tests.unload_models

[testenv:coverage]
# Subprocess coverage based on https://hynek.me/articles/turbo-charge-tox/
allowlist_externals = coverage
set_env = COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre = python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
commands =
    coverage run --parallel -m pytest {posargs} tests/

[testenv:format]
allowlist_externals = ruff
skip_install = true
commands =
    ruff format {posargs} src/ tests/ sdk-schema/sync-sdk-schema.py

[testenv:lint]
allowlist_externals = ruff
skip_install = true
commands =
    ruff check {posargs} src/ tests/

[testenv:typecheck]
allowlist_externals = mypy
commands =
    mypy --strict {posargs} src/ tests/

[testenv:sync-sdk-schema]
allowlist_externals = python
groups = sync-sdk-schema
skip_install = true
commands =
    python sdk-schema/sync-sdk-schema.py {posargs}

[testenv:docs]
groups =
deps = -r docs/requirements.txt
allowlist_externals = sphinx-build
commands =
    sphinx-build -W -b dirhtml {posargs} docs/ docs/_build

[testenv:linkcheck]
groups =
deps = -r docs/requirements.txt
allowlist_externals = sphinx-build
commands =
    sphinx-build -W -b linkcheck {posargs} docs/ docs/_build

[testenv:doctest]
# Doctest trick: change `...` to `..` in the expected test
# output to force test failures and see the actual results.
# (`...` is a placeholder for non-determistic output that
# can unfortunately hide real errors in the example output)
groups =
deps = -r docs/requirements.txt
allowlist_externals = sphinx-build
commands =
    sphinx-build -W -b doctest {posargs} docs/ docs/_build

[gh]
python =
    3.10 = py3.10
    3.11 = py3.11
    3.12 = py3.12
    # Collect coverage stats on the newest version
    3.13 = coverage

</document_content>
</document>

</documents>