Repository navigation
feat(server): add reviewed LiteLLM Chat dialect - #2454
Merged
Pouyanpi merged 3 commits intoOct 19, 2026
Merged
Conversation
Pouyanpi
marked this pull request as ready for review
October 14, 2026 11:52
Pouyanpi
force-pushed
the
pouyanpi/phase-d-final-20261013-litellm-dialect
branch
from
October 14, 2026 12:05
3183c7f to
89a5657
Compare
Contributor
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryAdds an explicitly selected LiteLLM Chat dialect without changing the default OpenAI policy.
No actionable issues were found. Tests were inspected but not run.
|
m-misiura
reviewed
Oct 19, 2026
m-misiura
reviewed
Oct 19, 2026
Base automatically changed from
pouyanpi/phase-d-final-20261013-d1-outbound
to
develop
October 19, 2026 13:46
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Support the gateway response subset needed by the next recorded-test cut without opening the base OpenAI policy or treating provider-specific content as opaque. Keep nullable extension containers closed, allow only null message refusal and empty choice extensions, and explicitly rebind nested response types. Reuse the authoritative OpenAI request and stream bindings and add trusted endpoint selection to the private router. Export the resolved policy through the existing CLI; document pinned source evidence and the limits of the supported subset. No LiteLLM runtime dependency, dialect registry, YAML inheritance, or compiler machinery is introduced. Validation: 625 selected offline tests, changed-file pre-commit, export CLI drift check, and Markdown link checks pass. An independent policy-level check accepts both buffered success recordings and 117 events across the two streaming recordings at D-2 commit 1607aa70a4; full recorded HTTP replay remains with D-2. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Review LiteLLM v1.102.1 source alongside deployment OpenAPI and archived recordings instead of treating observed payloads as the entire schema. Preserve native finish metadata as opaque and recognize empty source-declared content fields and streaming extension bags without allowing unreviewed generated content. Reuse OpenAI event roles and handwritten lifecycle hooks, derive policy from the rebound typed declarations, and regenerate the inspection contract. Document version evidence, request-control exclusions, and application-owned extensions. Validated 678 focused offline tests and pre-commit. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Pouyanpi
force-pushed
the
pouyanpi/phase-d-final-20261013-litellm-dialect
branch
from
October 19, 2026 13:50
16a81b3 to
1cb60a4
Compare
Contributor
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
Adds an explicitly selected LiteLLM Chat dialect for reviewed buffered and
streaming wire shapes while retaining the single-text guardrail profile.
Why
LiteLLM can add provider-specific extension fields to otherwise OpenAI-compatible
responses. Those fields need a reviewed policy so inspected exchanges can accept
supported shapes without widening the default OpenAI declaration.
How it works
Typed Python projections define the dialect. Message and choice extension
containers remain closed; null refusal, empty content arrays, and reviewed
native finish metadata have individual policies. Streaming uses rebound
projections and the existing OpenAI event semantics and lifecycle hooks.
A trusted application explicitly supplies the endpoint declaration. Omitting
it retains the default OpenAI policy. Hostnames, model strings, response fields,
and exported YAML do not select a dialect.
What Changed
Review Notes
Review the field policy and explicit selection boundary. This is a reviewed
LiteLLM subset, not compatibility with every release, backend, or gateway.
No additional request controls or arbitrary extension contents are enabled.
No LiteLLM runtime dependency or compiler machinery is introduced.
AI tools assisted with implementation and review.
Summary by CodeRabbit