AnthropicContentBlock (api/anthropic_models.py)

vllm-mlx · vllm_mlx/api/anthropic_models.py · python · Apache-2.0
ai

Pydantic models for Anthropic Messages API, enabling Claude-compatible client communication.

# Source: https://github.com/waybarrios/vllm-mlx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# SPDX-License-Identifier: Apache-2.0
"""
Pydantic models for Anthropic Messages API.

These models define the request and response schemas for the
Anthropic-compatible /v1/messages endpoint, enabling clients like
Claude Code to communicate with vllm-mlx.
"""

import uuid
from typing import Any

from pydantic import BaseModel, Field

# =============================================================================
# Request Models
# =============================================================================


class AnthropicContentBlock(BaseModel):
    """A content block in an Anthropic

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key