#6681·ogx

Enable /v1/messages integration tests for the remaining native passthrough providers

Author: mattfCreated Sep 28, 2026Updated Sep 30, 2026

Context

#6680 unified the six native /v1/messages passthrough providers behind AnthropicMixin (src/ogx/providers/utils/inference/anthropic_mixin.py): anthropic, meta, ollama, vllm, fireworks, deepseek.

The messages integration suite (tests/integration/messages/) runs in CI under only two setups (tests/integration/ci_matrix.json):

CI suite Setup Provider Path exercised
messages ollama ollama native passthrough (AnthropicMixin)
messages-openai gpt OpenAI translation to chat completions

So of the six mixin providers, only ollama has end-to-end coverage. The other five are unit-tested only (tests/unit/providers/utils/inference/test_anthropic_mixin.py). Per-provider wire behavior that unit tests can't pin: auth header style (x-api-key vs Bearer), base-URL construction (vLLM /v1 dedup, DeepSeek's separate anthropic_base_url host), real streaming SSE, upstream error preservation, and the count_tokens fallback (fireworks/deepseek have no native endpoint).

Work items

  1. vLLM — no API key needed, start here

    • Setup definition already exists (SETUP_DEFINITIONS["vllm"]); the suite just needs a CI entry: {"suite": "messages", "setup": "vllm"} in tests/integration/ci_matrix.json
    • Record once: ./scripts/integration-tests.sh --stack-config server:ci-tests --suite messages --setup vllm --inference-mode record
    • Pins Bearer auth, /v1 URL dedup, and streaming with no CI secrets required
  2. Fireworks, Anthropic — setups already exist, need matrix entries + recordings

    • Add {"suite": "messages", "setup": "fireworks"} / {"suite": "messages", "setup": "anthropic"}
    • Recordings need FIREWORKS_API_KEY / ANTHROPIC_API_KEY (locally, or via the record-integration-tests.yml workflow)
    • Verify the API key is available as a CI secret for replay (the provider validates the key before the recorder intercepts, even in replay mode)
  3. Meta, DeepSeek — need new setup definitions

    • Add SETUP_DEFINITIONS entries (env vars + model IDs) in tests/integration/suites.py, then matrix entries + recordings
    • DeepSeek note: messages traffic goes to the anthropic_base_url host, not base_url — the setup must set both
    • Verify server:ci-tests distribution config registers each provider when its env vars are set (same pattern as the ollama provider's ${env.OLLAMA_URL:+…} gating)

Scope notes

  • Suite root is the whole tests/integration/messages/ directory: test_messages.py (14 tests) + test_message_batches.py (6) + two claude smoke tests (self-skip without the claude binary)
  • Consider adding a count_tokens test to the suite while recording, to cover both the native endpoint (ollama/anthropic/meta/vllm) and the fallback path (fireworks/deepseek)

Acceptance criteria

  • messages suite green in CI replay mode for all six mixin providers
  • Recordings committed per new setup
  • No new CI secrets required for replay (keys only needed at record time)

Refs: #6680