Examples

Openai Selected Provider Version Fixture

Controlled inference-fixture replay for OpenAI Chat Completions to an Anthropic Messages provider

Praxis AI v0.12.1 (alpha) 2 min read

Category: Test fixture
Task: Controlled inference-fixture replay for OpenAI Chat Completions to an Anthropic Messages provider

Prerequisites: The matching test or replay fixture; this is not a standalone deployment configuration.

Run it: Use ghcr.io/praxis-proxy/ai:0.12.1 and follow the container quickstart to mount and start the configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

Companion resources from the same snapshot:

# OpenAI Chat Completions -> Anthropic Messages 2026-10-21 Fixture
#
# Controlled inference-fixture replay for OpenAI Chat Completions to an
# Anthropic Messages provider. The routing overlay is a checked-in synthetic
# fixture and is resolved by the inference replay harness.
#
# API version: `api_version: "2026-10-21"` overrides caller headers and the
# co-configured native `default_version`. The caller's `Authorization` is
# removed and a dummy fixture key is injected as `x-api-key`.

listeners:
  - name: proxy
    address: "0.0.0.0:8080"
    filter_chains: [main]

filter_chains:
  - name: main
    filters:
      - filter: model_to_header
        header: X-Model

      - filter: intelligent_route
        overlay_file: tests/integration/fixtures/inference/routing/openai-to-anthropic.json
        model_header: X-Model
        clusters: [anthropic-backend]
        reload: {enabled: false}

      - filter: openai_chat_completions_to_anthropic_stream
        max_partial_event_bytes: 1048576
        max_tool_blocks: 256

      - filter: openai_chat_completions_to_anthropic
        api_version: "2026-10-21"
        max_body_bytes: 1048576

      # A native Messages default must not override the translated contract.
      - filter: anthropic_messages_protocol
        default_version: "2023-06-01"

      - filter: credential_inject
        credentials:
          - name: anthropic-fixture-secret
            namespace: grid-fixture
            key: api-key
            strategy: apikey
            header: x-api-key
            value: fixture-only-dummy-token

      - filter: load_balancer
        clusters:
          - name: anthropic-backend
            endpoints: ["127.0.0.1:8001"]

admin: {}
shutdown_timeout_secs: 5

insecure_options:
  allow_private_endpoints: true