Add cross-provider protocol conformance canaries - #102
Merged
Conversation
Reviewer's GuideAdd a protocol conformance subsystem (store, canaries, routing, CLI/proxy surfaces, and CI workflow hooks) that records bounded per-model feature evidence and uses it to gate feature-specific auto-routing, caching, and streaming across OpenAI-style, Anthropic Messages, and Responses APIs. Sequence diagram for feature-aware chat routing with protocol conformancesequenceDiagram
actor User
participant Proxy
participant Pool
participant ConformanceStore
participant Provider
User->>Proxy: POST /v1/chat/completions
Proxy->>Proxy: _handle_chat(req)
Proxy->>Proxy: _normalize_messages(messages)
Proxy->>Pool: chat(messages, tools, response_format, protocol)
Pool->>ConformanceStore: required_features(messages, tools, response_format, protocol)
Pool->>ConformanceStore: verified_targets(all_targets, features, exact_pin)
ConformanceStore-->>Pool: filtered_targets
Pool->>Pool: cache.make_key(..., response_format, protocol)
Pool->>Pool: cache.get(key)
alt cache_hit and feature_cache_eligible
Pool-->>Proxy: Reply(from cache)
Proxy-->>User: HTTP 200 (cached reply)
else cache_miss or cache_not_eligible
loop over candidates
Pool->>Provider: call(provider, model, messages, tools, tool_choice, response_format)
Provider-->>Pool: Reply
end
Pool-->>Proxy: Reply
Proxy-->>User: HTTP 200 (live reply)
end
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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
Verification
pytest --cov=freellmpool --cov-branch --cov-report=json:.coverage.jsonruff check .mypy56099172d493138210b62a88c160136ebdf75a9cFixes #71
Summary by Sourcery
Introduce per-model protocol conformance canaries and wire their evidence into routing, proxy/CLI surfaces, and CI workflows.
New Features:
Enhancements:
CI:
Documentation:
Tests: