"""Schema bridge — auto-generated from the generated pydantic models.

DO NOT EDIT MANUALLY. This file is regenerated by _sdk_gen/
after each model regeneration. It provides structural details that
the convenience layer uses, ensuring alignment with the OpenAPI spec.
"""

from __future__ import annotations

from typing import Any


# --- Credential construction ---

CREDENTIAL_KIND_API_KEY = "CREDENTIAL_KIND_API_KEY"

def build_api_key_credentials(api_key: str) -> dict[str, Any]:
    """Build a credentials dict for API key authentication.

    Constructs the correct EndpointAuthentication structure based on
    the generated models.
    """
    return {
        "kind": CREDENTIAL_KIND_API_KEY,
        "api_key": {"inline_secret": api_key},
    }


# --- Default enum values ---

DEFAULT_DISTRIBUTION_TYPE = "DENSE"


# --- Model field name sets (for validation) ---

EMBEDDER_CREATE_FIELDS = {'endpoint_url', 'display_name', 'monitoring_endpoint', 'api_path', 'version', 'owner_id', 'max_sequence_length', 'embedder_id', 'model_identifier', 'labels', 'description', 'credentials', 'dimensionality', 'distribution_type', 'supported_modalities', 'provider_type'}
RERANKER_CREATE_FIELDS = {'endpoint_url', 'display_name', 'api_path', 'version', 'owner_id', 'model_identifier', 'labels', 'description', 'credentials', 'reranker_id', 'monitoring_endpoint', 'supported_modalities', 'provider_type'}
LLM_CREATE_FIELDS = {'endpoint_url', 'display_name', 'api_path', 'version', 'max_context_length', 'llm_id', 'owner_id', 'default_sampling_params', 'model_identifier', 'labels', 'description', 'credentials', 'client_config', 'capabilities', 'monitoring_endpoint', 'supported_modalities', 'provider_type'}
SPACE_CREATE_FIELDS = {'default_chunking_config', 'space_id', 'public_read', 'owner_id', 'labels', 'name', 'space_embedders'}
RETRIEVE_FIELDS = {'fetch_memory_content', 'message', 'post_processor', 'space_keys', 'requested_size', 'fetch_memory', 'hnsw', 'context'}
