### Frontend Setup and Run (Next.js) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-local.md Installs Node.js dependencies using npm and starts the Next.js development server. It configures the gateway URL for the UI by setting the NEXT_PUBLIC_GATEWAY_URL environment variable. ```bash cd frontend npm install # Point UI to the gateway export NEXT_PUBLIC_GATEWAY_URL=http://localhost:8084 npm run dev ``` -------------------------------- ### Backend Setup and Run (FastAPI) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-local.md Sets up a Python virtual environment, installs dependencies from requirements.txt, and starts the FastAPI application using uvicorn. It's recommended to create a .env file for configuration overrides. ```bash cd backend python -m venv .venv && source .venv/bin/activate pip install --upgrade pip pip install -r requirements.txt # Optional: create .env (override DATABASE_URL, CORS origins, etc.) uvicorn src.main:app --reload --host 0.0.0.0 --port 8084 ``` -------------------------------- ### Install and Run Frontend Admin UI Source: https://github.com/aulendurforge/cortex-vllm/blob/main/frontend/README.md Installs frontend dependencies, sets the gateway URL environment variable, and starts the Next.js development server for the Cortex Admin UI. ```bash cd frontend npm install # Points to the gateway default port 8084 (override as needed) echo "NEXT_PUBLIC_GATEWAY_URL=http://localhost:8084" > .env.local npm run dev # http://localhost:3001 ``` -------------------------------- ### Start Cortex vLLM Stack (Docker Compose) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Starts the Cortex vLLM services using Docker Compose. Includes options for basic CPU-only setup or enabling Linux and GPU metrics exporters, requiring NVIDIA drivers and the NVIDIA Container Toolkit. ```bash # From repo root # Basic (CPU, no exporters): docker compose -f docker.compose.dev.yaml up --build # Linux host metrics (node-exporter) and GPU metrics (DCGM exporter): # Prereqs: NVIDIA driver + NVIDIA Container Toolkit installed. # Enable profiles once, or pass them per command. export COMPOSE_PROFILES=linux,gpu docker compose -f docker.compose.dev.yaml up -d --build ``` -------------------------------- ### Backend Local Development Setup (Python) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/contributing/how-to-contribute.md Sets up the Python virtual environment and installs backend dependencies for local development. It then starts the Uvicorn server for the backend application. ```Shell cd backend && python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt uvicorn src.main:app --reload --port 8084 ``` -------------------------------- ### Query System Summary from Cortex Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Fetches a summary of the system's status and resources from the Cortex gateway using a GET request to the /admin/system/summary endpoint. ```bash curl http://localhost:8084/admin/system/summary ``` -------------------------------- ### Frontend Local Development Setup (JavaScript/Node.js) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/contributing/how-to-contribute.md Installs frontend dependencies using npm and starts the development server. It also sets an environment variable for the backend gateway URL. ```Shell cd frontend && npm install export NEXT_PUBLIC_GATEWAY_URL=http://localhost:8084 && npm run dev ``` -------------------------------- ### Start Prometheus with Docker Compose Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-local.md Launches Prometheus using a Docker Compose configuration file for local metrics collection. This is an optional step for developers who need to monitor service metrics. ```bash docker compose -f docker.compose.dev.yaml up -d prometheus ``` -------------------------------- ### Query GPU Information from Cortex Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Retrieves information about the system's GPUs from the Cortex gateway via a GET request to the /admin/system/gpus endpoint. ```bash curl http://localhost:8084/admin/system/gpus ``` -------------------------------- ### Docker Compose Quickstart for CORTEX Source: https://github.com/aulendurforge/cortex-vllm/blob/main/README.md This snippet demonstrates how to quickly set up and run CORTEX using Docker Compose in a development environment. It includes commands for starting the services, checking health, bootstrapping the admin user, and making an API call. ```bash # From repo root docker compose -f docker.compose.dev.yaml up --build # Health curl http://localhost:8084/health # Bootstrap admin (one-time) curl -X POST http://localhost:8084/admin/bootstrap-owner \ -H 'Content-Type: application/json' \ -d '{"username":"admin","password":"admin","org_name":"Default"}' # Sign in at the UI (dev cookie session) # http://localhost:3001/login (admin / admin) # Create API key curl -X POST http://localhost:8084/admin/keys -H 'Content-Type: application/json' -d '{"scopes":"chat,completions,embeddings"}' # Call API (replace YOUR_TOKEN) curl -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" \ http://localhost:8084/v1/chat/completions \ -d '{"model":"meta-llama/Llama-3-8B-Instruct","messages":[{"role":"user","content":"Hello!"}]}' ``` -------------------------------- ### Start Postgres and Redis Containers Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-local.md Launches PostgreSQL and Redis services in detached Docker containers. PostgreSQL is configured with user, password, and database 'cortex', exposed on port 5432. Redis is exposed on port 6379. ```bash # Postgres docker run -d --name cortex-pg -e POSTGRES_USER=cortex -e POSTGRES_PASSWORD=cortex -e POSTGRES_DB=cortex -p 5432:5432 postgres:14 # Redis docker run -d --name cortex-redis -p 6379:6379 redis:7 ``` -------------------------------- ### Enable GPU and Host Metrics with Docker Compose Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-local.md Starts Prometheus exporters for host and GPU metrics on Linux systems with NVIDIA drivers. It requires setting the COMPOSE_PROFILES environment variable to 'linux,gpu' and uses a Docker Compose file. ```bash export COMPOSE_PROFILES=linux,gpu docker compose -f docker.compose.dev.yaml up -d node-exporter dcgm-exporter ``` -------------------------------- ### Recreate Cortex Gateway Service Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Rebuilds and restarts only the gateway service in the Docker Compose setup, typically after modifying its configuration like CORS origins. ```bash docker compose -f docker.compose.dev.yaml up -d --build gateway ``` -------------------------------- ### Health Check for Cortex Gateway Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Performs a health check on the Cortex Gateway service by sending a GET request to the /health endpoint. ```http curl http://localhost:8084/health ``` -------------------------------- ### Reset Cortex vLLM Environment Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Resets the Cortex vLLM development environment to a fresh state by stopping and removing containers, removing associated volumes, and then rebuilding and starting the services. ```bash docker compose -f docker.compose.dev.yaml down -v docker ps -a --filter "name=vllm-model-" -q | xargs -r docker rm -f docker compose -f docker.compose.dev.yaml up -d --build ``` -------------------------------- ### GPU Monitoring Setup with Docker Compose Source: https://github.com/aulendurforge/cortex-vllm/blob/main/README.md This snippet outlines the steps to set up GPU and system monitoring for CORTEX using Docker Compose. It involves exporting compose profiles and starting Prometheus, node-exporter, and dcgm-exporter. ```bash export COMPOSE_PROFILES=linux,gpu docker compose -f docker.compose.dev.yaml up -d prometheus node-exporter dcgm-exporter # Verify http://localhost:9090/targets shows the exporters as UP. # Gateway system endpoints: curl http://localhost:8084/admin/system/summary curl http://localhost:8084/admin/system/gpus ``` -------------------------------- ### Docker Compose Development Start Source: https://github.com/aulendurforge/cortex-vllm/blob/main/backend/README.md Command to build and start the development environment using Docker Compose. ```bash docker compose -f ../../docker.compose.dev.yaml up --build ``` -------------------------------- ### Create API Key for Cortex Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Generates an API key for accessing Cortex services by sending a POST request to the /admin/keys endpoint with specified scopes. The token is displayed once. ```bash curl -X POST http://localhost:8084/admin/keys \ -H 'Content-Type: application/json' \ -d '{"scopes":"chat,completions,embeddings"}' ``` -------------------------------- ### Configure CORS Allow Origins (Bash) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/configuration.md Provides an example of setting the `CORS_ALLOW_ORIGINS` environment variable to permit requests from a specific UI origin, typically used during development. ```bash CORS_ALLOW_ORIGINS=http://localhost:3001,http://127.0.0.1:3001 ``` -------------------------------- ### Bootstrap Admin User for Cortex Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Creates an initial administrator user for the Cortex system via a POST request to the /admin/bootstrap-owner endpoint, providing username, password, and organization name. ```bash curl -X POST http://localhost:8084/admin/bootstrap-owner \ -H 'Content-Type: application/json' \ -d '{"username":"admin","password":"admin","org_name":"Default"}' ``` -------------------------------- ### Login to Cortex API Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Authenticates with the Cortex API by sending a POST request to the /auth/login endpoint with username and password. The response includes a session cookie for subsequent requests. ```bash curl -X POST http://localhost:8084/auth/login \ -H 'Content-Type: application/json' \ -d '{"username":"admin","password":"admin"}' -i ``` -------------------------------- ### Default Configuration File (Python) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/configuration.md References the default configuration settings for CORTEX, which are defined in the `backend/src/config.py` file. This file serves as the baseline for environment variable overrides. ```python # Defaults are defined in `backend/src/config.py` ``` -------------------------------- ### Make Chat Completions API Call Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Demonstrates how to make a chat completions API call to the Cortex vLLM service using a provided API token and specifying the model and user message. ```bash curl -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ http://localhost:8084/v1/chat/completions \ -d '{"model":"meta-llama/Llama-3-8B-Instruct","messages":[{"role":"user","content":"Hello!"}]}' ``` -------------------------------- ### Example Chat Completions API Call Source: https://github.com/aulendurforge/cortex-vllm/blob/main/backend/README.md This example shows how to call the Cortex Gateway's chat completions endpoint. It includes an Authorization header and a JSON payload specifying the model and user messages. ```bash curl -H "Authorization: Bearer dev-key" \ -H "Content-Type: application/json" \ http://localhost:8084/v1/chat/completions \ -d '{"model":"meta-llama/Llama-3-8B-Instruct","messages":[{"role":"user","content":"Hello!"}]}' ``` -------------------------------- ### CORS Preflight Check (Bash) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/configuration.md Illustrates how to perform a CORS preflight check using `curl` to verify that the gateway correctly responds to OPTIONS requests with the appropriate `Access-Control-Allow-Origin` header. ```bash curl -i -X OPTIONS http://localhost:8084/auth/login \ -H 'Origin: http://localhost:3001' \ -H 'Access-Control-Request-Method: POST' ``` -------------------------------- ### Enable Docker Compose Profiles (Bash) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/configuration.md Demonstrates how to enable Docker Compose profiles for services like node-exporter and GPU exporters. It shows both one-off command execution and persistent environment variable setting for shell sessions. ```bash # one-off docker compose -f docker.compose.dev.yaml --profile linux --profile gpu up -d # persistent for the shell export COMPOSE_PROFILES=linux,gpu docker compose -f docker.compose.dev.yaml up -d ``` -------------------------------- ### Stop Cortex vLLM Stack Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/getting-started/quickstart-docker.md Stops the running Docker Compose services for Cortex vLLM by sending an interrupt signal (Ctrl+C) and then executing the down command. ```bash Ctrl+C then docker compose -f docker.compose.dev.yaml down ``` -------------------------------- ### vLLM GGUF Model Configuration Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/models/vllm.md Additional flags required for configuring vLLM engines when using GGUF model formats, specifically for specifying the tokenizer and Hugging Face configuration path. ```Shell --tokenizer --hf-config-path ``` -------------------------------- ### Docker Manager Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/backend.md The `docker_manager.py` module is responsible for managing vLLM containers. It handles starting and stopping containers and constructing Docker command flags based on model configuration. ```Python # backend/src/docker_manager.py # Placeholder for Docker management logic # This would involve: # - Using libraries like `docker-py` to interact with the Docker daemon # - Defining functions to start, stop, and manage vLLM container lifecycles # - Parsing model configurations to generate appropriate Docker run commands (e.g., image, ports, volumes, environment variables) # Example structure (conceptual): # import docker # # client = docker.from_env() # # def start_vllm_container(model_config: dict): # # Construct docker run command based on model_config # # e.g., client.containers.run("vllm/vllm-openai:latest", detach=True, ports={'8000/tcp': 8000}, ...) # pass ``` -------------------------------- ### Database Migrations (Alembic) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/backend.md For production environments, database schema changes should be managed using Alembic migrations, located in the `backend/alembic/` directory. Development setups can use `Base.metadata.create_all()` for initial schema creation. ```Python # backend/src/main.py (example for dev setup) # from models import Base, engine # Base.metadata.create_all(bind=engine) # backend/alembic/env.py (example for Alembic setup) # from alembic import context # from sqlalchemy import engine_from_config, pool # from logging.config import fileConfig # # # this is the Alembic Config object, which provides # # access to the values within the .ini file # config = context.config # # # Interpret the config file for Python logging. # # This line sets up loggers basically. # fileConfig(config.config_file_name) # # # add your model's MetaData object here # # for 'autogenerate' support # # from myapp.models import mymodel # # target_metadata = mymodel.Base.metadata # target_metadata = None # Replace with actual metadata ``` -------------------------------- ### vLLM Engine Configuration Flags Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/models/vllm.md Key command-line flags for configuring vLLM engines managed by Cortex, including task type, data type, tensor parallelism, GPU memory utilization, and model length. ```Shell --task embed --dtype --tensor-parallel-size --gpu-memory-utilization --max-model-len ``` -------------------------------- ### vLLM Advanced Configuration Flags Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/models/vllm.md Advanced flags for fine-tuning vLLM engine performance, such as batch token limits, KV cache data types, quantization, block size, CPU offloading, prefix caching, and chunked prefill. ```Shell --max-num-batched-tokens --kv-cache-dtype --quantization --block-size --swap-space --cpu-offload-gb --enable-prefix-caching --enable-chunked-prefill ``` -------------------------------- ### Chat Completions API Request Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/api/openai-compatible.md Example of how to make a POST request to the /v1/chat/completions endpoint using curl. It demonstrates authentication with a bearer token and sending a JSON payload with model and message details. Streaming is also supported. ```bash curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ "$GATEWAY/v1/chat/completions" \ -d '{ "model":"meta-llama/Llama-3-8B-Instruct", "messages":[{"role":"user","content":"Hello!"}], "stream": false }' ``` -------------------------------- ### Apply Apache License 2.0 Boilerplate Source: https://github.com/aulendurforge/cortex-vllm/blob/main/LICENSE.txt This snippet shows the standard boilerplate text required to apply the Apache License 2.0 to your work. It includes placeholders for copyright year and contributor information, and specifies the license terms. ```text Copyright {{CURRENT_YEAR}} [Aulendur LLC] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` -------------------------------- ### Running Backend Tests (Python) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/contributing/how-to-contribute.md Executes backend tests using pytest, typically located within the backend's source test directory. ```Shell pytest backend/src/tests ``` -------------------------------- ### Bootstrap Owner API Call Source: https://github.com/aulendurforge/cortex-vllm/blob/main/backend/README.md This snippet demonstrates how to bootstrap an owner for the Cortex Gateway using a POST request. It requires the email, password, and organization name as JSON payload. ```bash curl -X POST http://localhost:8084/admin/bootstrap-owner \ -H 'Content-Type: application/json' \ -d '{"email":"owner@example.com","password":"change-me","org_name":"Default"}' ``` -------------------------------- ### Database Migrations Command Source: https://github.com/aulendurforge/cortex-vllm/blob/main/backend/README.md Command to apply database migrations using Alembic. ```bash alembic upgrade head ``` -------------------------------- ### Run Development Deployment with Docker Compose Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/operations/deployments.md This snippet shows how to build and run the development environment for Cortex VLLM using Docker Compose. It requires the `docker.compose.dev.yaml` file. ```bash docker compose -f docker.compose.dev.yaml up --build ``` -------------------------------- ### Cortex Architecture Diagram Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/system.md This Mermaid diagram illustrates the architecture of the Cortex gateway. It shows the flow from the client to the FastAPI gateway, including components like OpenAI routes, authentication, rate limiting, URL selection, and the vLLM engines. It also depicts external dependencies like databases, Redis, and Prometheus. ```mermaid graph TD Client[Client / SDK] -->|HTTP: /v1/*| Gateway[FastAPI Gateway] subgraph Gateway Router[OpenAI Routes] --> Auth[API Key Auth] Router --> RL[Rate Limit / Concurrency] Router --> Choose[URL Selection] Choose --> Upstreams[(vLLM Engines)] Gateway --> DB[(Postgres)] Gateway --> Redis[(Redis)] Gateway --> Prom[Prometheus] end Health[Health Poller] --> Upstreams Health --> Gateway ``` -------------------------------- ### Configuration Management Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/backend.md The `config.py` module handles application settings loaded from environment variables, providing sensible defaults. It also includes helper functions for managing connection pools and file paths. ```Python # backend/src/config.py # Placeholder for configuration loading # Uses environment variables with defaults. # Example settings: # - DATABASE_URL # - REDIS_URL # - MODEL_CACHE_DIR # - LOG_LEVEL # Example structure (conceptual): # import os # from pydantic import BaseSettings # # class Settings(BaseSettings): # database_url: str = "postgresql://user:password@host:port/db" # redis_url: str = "redis://localhost:6379" # log_level: str = "INFO" # # class Config: # env_file = ".env" # # settings = Settings() ``` -------------------------------- ### Create API Key Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/api/admin-api.md Creates a new API key with specified scopes. This endpoint requires authentication via a developer cookie session. ```bash curl -X POST "$GATEWAY/admin/keys" -H 'Content-Type: application/json' -d '{"scopes":"chat,completions,embeddings"}' ``` -------------------------------- ### OpenAI-Compatible Endpoints Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/index.md CORTEX exposes standard OpenAI API endpoints for chat completions, text completions, and embeddings, allowing seamless integration with existing tools and SDKs. ```bash curl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ ... }' ``` ```bash curl http://localhost:8000/v1/completions \ -H "Content-Type: application/json" \ -d '{ ... }' ``` ```bash curl http://localhost:8000/v1/embeddings \ -H "Content-Type: application/json" \ -d '{ ... }' ``` -------------------------------- ### CORS Configuration for Development UI Source: https://github.com/aulendurforge/cortex-vllm/blob/main/README.md This snippet shows how to configure CORS settings in the `docker.compose.dev.yaml` file to allow your development UI to communicate with the CORTEX gateway. It also includes the command to recreate the gateway service after making changes. ```bash CORS_ALLOW_ORIGINS: http://10.1.10.241:3001,http://localhost:3001,http://127.0.0.1:3001 Recreate the gateway after edits: docker compose -f docker.compose.dev.yaml up -d --build gateway ``` -------------------------------- ### State Management Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/backend.md The `state.py` module manages in-memory snapshots of critical system components. This includes the status of circuit breakers, health information, model registry, and load balancing indices. ```Python # backend/src/state.py # Placeholder for state management # This module would hold shared state across the application: # - Circuit breaker status (open, closed, half-open) # - Health status of upstream services # - List of available models and their configurations # - Load balancing indices for routing requests # Example structure (conceptual): # class CircuitBreakerState: # pass # # class HealthState: # pass # # class RegistryState: # pass # # class LoadBalancerState: # pass # # circuit_breakers = {} # health_status = {} # model_registry = {} # lb_indices = {} ``` -------------------------------- ### API Key Authentication Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/backend.md The `auth.py` module handles API key verification for securing endpoints. It also includes guards for development cookie sessions, specifically for protecting administrative routes. ```Python # backend/src/auth.py # Placeholder for authentication logic # This would involve: # - Verifying API keys from request headers (e.g., 'Authorization: Bearer YOUR_API_KEY') # - Implementing session management for dev environments using cookies # - Protecting specific routes (e.g., admin routes) based on authentication status # Example structure (conceptual): # from fastapi import Depends, HTTPException, status # from fastapi.security import APIKeyHeader # # api_key_header = APIKeyHeader(name="X-API-Key") # # async def verify_api_key(api_key: str = Depends(api_key_header)): # # Logic to check if api_key is valid # if not is_valid(api_key): # raise HTTPException( # status_code=status.HTTP_401_UNAUTHORIZED, # detail="Invalid API Key" # ) # return api_key ``` -------------------------------- ### API Client Fetch Helper (TypeScript) Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/frontend.md This TypeScript file defines a fetch helper for API clients. It adds an 'x-request-id' header and normalizes the error envelope from the backend. ```TypeScript src/lib/api-clients.ts ``` -------------------------------- ### OpenAI Compatible Endpoints Source: https://github.com/aulendurforge/cortex-vllm/blob/main/docs/architecture/backend.md The `routes/openai.py` module provides OpenAI-compatible API endpoints. It includes functionality for streaming responses, implementing retries, and integrating circuit breaker hooks for robust error handling and fault tolerance. ```Python # backend/src/routes/openai.py # Placeholder for OpenAI compatible endpoint logic # This would typically involve: # - Handling requests for chat completions, embeddings, etc. # - Interfacing with the vLLM model server # - Implementing streaming for responses # - Applying retry logic and circuit breaker patterns # Example structure (conceptual): # from fastapi import APIRouter, Request # from typing import Dict, Any # # router = APIRouter() # # @router.post("/v1/chat/completions") # async def create_chat_completion(request: Request): # # Process request, call vLLM, handle streaming and errors # pass ```