Skip to content

Add Chat Completions and Anthropic Messages vision support - #4

Merged
Zesuy merged 5 commits into
mainfrom
codex/downstream-chat-claude-vision
Aug 6, 2026
Merged

Add Chat Completions and Anthropic Messages vision support#4
Zesuy merged 5 commits into
mainfrom
codex/downstream-chat-claude-vision

Conversation

@Zesuy

@Zesuy Zesuy commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • refactor downstream request handling around protocol-neutral adapters and plans
  • add image rewriting for OpenAI Chat Completions and Anthropic Messages while preserving existing Responses behavior
  • support visible-history and tool-result images with protocol-native validation and errors
  • upgrade the plugin to 0.2.0 and CLIProxyAPI compatibility to v7.2.119
  • update fixtures, contract verification, host E2E coverage, packaging defaults, and documentation

Why

DeepSeek Vision previously understood only OpenAI Responses requests. CLIProxyAPI already owns upstream protocol translation, so the plugin only needs to discover and rewrite images in each supported downstream protocol before the host translates the request.

This release extends the existing target_models behavior automatically to Responses, Chat Completions, and Anthropic Messages without adding configuration or changing the host ABI/schema.

Behavior and compatibility

  • routes are matched exactly by source format and request path
  • image-bearing containers are analyzed jointly and rewritten in place
  • requests remain atomic and fail closed on malformed, unsafe, oversized, unavailable, or failed VLM processing
  • OpenAI routes use OpenAI error envelopes; Claude uses Anthropic error envelopes
  • non-target models, unsupported routes, and valid image-free requests continue to pass through unchanged
  • the VLM call still uses the host Responses execution path; no response interception or provider protocol logic was added

Validation

  • go test -count=1 ./...
  • go test -race ./...
  • go vet ./...
  • ./scripts/verify-contracts.sh
  • CLIPROXY_ROOT=<v7.2.119 checkout> ./scripts/host-e2e.sh
  • make verify-version-override
  • ./scripts/package-smoke.sh
  • git diff --check

A live API matrix also covered Responses, Chat, Claude, Chat streaming, unsupported Chat file IDs, non-target passthrough, VLM failure, and runtime reconfiguration. Temporary credentials were supplied only at runtime and were not persisted.

@Zesuy
Zesuy marked this pull request as ready for review August 6, 2026 12:25
@Zesuy
Zesuy merged commit 39efd1a into main Aug 6, 2026
2 checks passed
@Zesuy
Zesuy deleted the codex/downstream-chat-claude-vision branch August 6, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant