Add Wardwright provider adapter docs#207
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Wardwright as a named OpenAI-compatible provider adapter kind over Calciforge’s shared HTTP core, and updates docs/telemetry so Wardwright route receipts can be preserved and surfaced for operators while keeping legacy in-process synthetic selectors available for existing installs.
Changes:
- Document Wardwright as the preferred path for new synthetic-model composition (alloys/cascades/dispatchers now described as legacy compatibility).
- Extend OpenAI chat completion response handling to preserve provider-specific response extensions (via a flattened
extra_bodymap). - Emit Wardwright receipt IDs in gateway attempt telemetry (log + OTLP attrs) and validate that legacy synthetic selectors produce a migration warning.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates gateway feature description and points new synthetic-model work to Wardwright. |
| docs/model-gateway.md | Adds Wardwright to provider-adapter docs and marks alloys/cascades/dispatchers as legacy compatibility. |
| docs/index.md | Notes legacy status of in-process synthetic selectors and points to Wardwright. |
| docs/adr/0002-provider-adapter-boundary.md | Documents Wardwright within the provider-adapter boundary decision and migration guidance. |
| docs/adr/0001-model-gateway-and-agent-boundaries.md | Adds Wardwright to the supported backend set and records the migration note. |
| crates/calciforge/src/proxy/openai.rs | Preserves unknown provider response fields and exposes Wardwright receipt extraction helper. |
| crates/calciforge/src/proxy/openai_streaming.rs | Initializes the new response extension map for streamed responses. |
| crates/calciforge/src/proxy/handlers.rs | Copies Wardwright receipt IDs into gateway attempt telemetry on successful calls. |
| crates/calciforge/src/proxy/telemetry.rs | Adds receipt_id to gateway attempt telemetry events (logs + OTLP attrs) and updates tests. |
| crates/calciforge/src/proxy/telemetry_tests.rs | Verifies provider-specific response extensions reach clients and receipt IDs reach telemetry. |
| crates/calciforge/src/proxy/gateway.rs | Adds GatewayType::Wardwright metadata/capabilities and shares the existing HTTP core. |
| crates/calciforge/src/proxy/gateway_tests.rs | Adds parsing/display/core-sharing + metadata assertions for Wardwright. |
| crates/calciforge/src/proxy/routing.rs | Adds a routing test asserting Wardwright uses the shared HTTP core and metadata. |
| crates/calciforge/src/proxy/mod.rs | Wires Wardwright into backend type parsing/headers and supported backend lists. |
| crates/calciforge/src/proxy/backend.rs | Updates mock response construction for the extended response type. |
| crates/calciforge/src/config.rs | Marks synthetic selector config sections as legacy and adds Wardwright to provider-kind docs. |
| crates/calciforge/src/config/validator.rs | Adds a config warning when legacy synthetic selectors are present. |
| crates/calciforge/src/config/validator_tests_3.rs | Adds coverage for the Wardwright allowlist and the legacy-selector warning behavior. |
15d39b7 to
ca44d03
Compare
Comment on lines
282
to
291
| Ok(ChatCompletionResponse { | ||
| id, | ||
| object: "chat.completion".to_string(), | ||
| created, | ||
| model: model.unwrap_or_else(|| requested_model.to_string()), | ||
| choices, | ||
| usage, | ||
| system_fingerprint: None, | ||
| extra_body: serde_json::Map::new(), | ||
| }) |
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
Validation