Skip to content

refactor(anthropic): rename translation filters to protocol-keyed names - #963

Open
leseb wants to merge 5 commits into
praxis-proxy:mainfrom
leseb:leseb/rename-translation-filters
Open

refactor(anthropic): rename translation filters to protocol-keyed names#963
leseb wants to merge 5 commits into
praxis-proxy:mainfrom
leseb:leseb/rename-translation-filters

Conversation

@leseb

@leseb leseb commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the two Anthropic format-translation filters to protocol-keyed names that state the bridge direction: anthropic_to_openaianthropic_messages_to_chat_completions and anthropic_stream_eventsanthropic_messages_to_chat_completions_stream. The rename spans registered filter names, structs, module directories, cross-filter metadata keys (anthropic_to_openai.*anthropic_messages_to_chat_completions.*, read by time_to_first_token and the stream filter), doctests, error strings, hand-written and generated docs, the example config's filter references, and integration tests. responses_to_chat_completions was already conformant and is unchanged; the example config filename and the stream filter's private anthropic_stream.* per-module state keys are intentionally left as-is (they are not filter identifiers or cross-filter contracts).

Related issue

N/A — naming-clarity refactor, no tracked issue.

Validation

  • Unit tests — make test (0 failures)
  • Integration or functional tests — make test (updated anthropic_messages suite + examples tests); inference fixtures check-inference green
  • make lint (exit 0); make build (exit 0)

Checklist

  • I reviewed every changed line and can explain the change.
  • New capabilities include an example config and functional example test. (No new capability; existing example config + functional example tests updated for the rename.)
  • User-facing behavior and generated documentation are updated. (cargo xtask generate-filter-docs; docs/filters/* and hand-written docs regenerated/updated.)
  • Performance-sensitive changes include appropriate benchmark or load-test evidence. (N/A — identifier rename only, no behavior change.)
  • Commits are signed and include a Signed-off-by trailer.

Breaking changes

Yes. The old filter names anthropic_to_openai and anthropic_stream_events are removed. Configurations referencing them must migrate to anthropic_messages_to_chat_completions and anthropic_messages_to_chat_completions_stream respectively; any config relying on the anthropic_to_openai.* cross-filter metadata keys must switch to anthropic_messages_to_chat_completions.*.

Rename the two Anthropic Messages format-translation filters to
self-describing, protocol-keyed names (<src>_to_<dst>[_stream]; "to" is
the client->backend bridge direction, "_stream" is the streaming axis):

- anthropic_to_openai     -> anthropic_messages_to_chat_completions
- anthropic_stream_events -> anthropic_messages_to_chat_completions_stream

Full-depth rename: registered filter names, Rust structs/config structs,
module directories, cross-filter metadata key prefixes, doctests, error
strings, generated and hand-written docs, example config contents, and
integration tests. responses_to_chat_completions is already protocol-keyed
and is left unchanged.

The example config file name (anthropic/messages-to-openai.yaml) and the
stream filter's private single-module state keys (anthropic_stream.*) are
intentionally kept: the filename is not a filter identifier and the state
keys are never a cross-filter contract.

Signed-off-by: Sébastien Han <seb@redhat.com>
…name

The messages_to_chat_completions_stream config module doc still named the
pre-rename "Anthropic stream events filter". Update it to match the sibling
non-stream config module doc and the renamed
anthropic_messages_to_chat_completions_stream filter.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb
leseb requested review from a team and nerdalert September 7, 2026 10:23
@leseb
leseb enabled auto-merge September 7, 2026 10:42
…ion-filters

Signed-off-by: Sébastien Han <seb@redhat.com>
…ion-filters

Signed-off-by: Sébastien Han <seb@redhat.com>
…ion-filters

Signed-off-by: Sébastien Han <seb@redhat.com>
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