refactor(anthropic): rename translation filters to protocol-keyed names - #963
Open
leseb wants to merge 5 commits into
Open
refactor(anthropic): rename translation filters to protocol-keyed names#963leseb wants to merge 5 commits into
leseb wants to merge 5 commits into
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the two Anthropic format-translation filters to protocol-keyed names that state the bridge direction:
anthropic_to_openai→anthropic_messages_to_chat_completionsandanthropic_stream_events→anthropic_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 bytime_to_first_tokenand the stream filter), doctests, error strings, hand-written and generated docs, the example config's filter references, and integration tests.responses_to_chat_completionswas already conformant and is unchanged; the example config filename and the stream filter's privateanthropic_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
make test(0 failures)make test(updatedanthropic_messagessuite + examples tests); inference fixturescheck-inferencegreenmake lint(exit 0);make build(exit 0)Checklist
cargo xtask generate-filter-docs;docs/filters/*and hand-written docs regenerated/updated.)Signed-off-bytrailer.Breaking changes
Yes. The old filter names
anthropic_to_openaiandanthropic_stream_eventsare removed. Configurations referencing them must migrate toanthropic_messages_to_chat_completionsandanthropic_messages_to_chat_completions_streamrespectively; any config relying on theanthropic_to_openai.*cross-filter metadata keys must switch toanthropic_messages_to_chat_completions.*.