Repository navigation
feat: import LiteLLM wildcard models - #2915
Merged
howardjohn merged 3 commits intoAug 7, 2026
Merged
Conversation
Signed-off-by: FenjuFu <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds LiteLLM wildcard model import support to the standalone agentgateway import pipeline, aligning emitted model patterns with agentgateway’s concrete model matching semantics while producing explicit findings for wildcard cases that can’t be represented safely.
Changes:
- Import “safe” wildcard model patterns (
*, prefix-wildcard, suffix-wildcard) and omitparams.modelwhen the upstream model contains a wildcard so requests preserve the caller’s concrete model. - Emit
unsupportedfindings for middle/multiple wildcards and for upstream wildcard rewrites that would change semantics in a way agentgateway can’t represent safely. - Expand the LiteLLM wildcard fixture and golden snapshot; rename the related golden test.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/agentgateway/src/import.rs | Implements wildcard model pattern validation/import rules and adds targeted unsupported findings for non-representable wildcard cases. |
| crates/agentgateway/src/tests/import/litellm/wildcard-model.yaml | Expands fixture coverage for safe wildcard patterns and unsupported wildcard edge cases. |
| crates/agentgateway/src/tests/import/litellm/wildcard-model.snap | Updates golden snapshot to include imported wildcard models and the new findings emitted for unsupported patterns. |
Suppressed comments (1)
crates/agentgateway/src/import.rs:818
- The upstream-wildcard-rewrite unsupported finding would be more actionable if it included both the public model pattern and the upstream model pattern that triggered the rewrite rejection.
source_path: format!("{source_path}.litellm_params.model"),
status: ImportStatus::Unsupported,
message: "LiteLLM upstream wildcard rewrites cannot be represented safely and the model was not emitted"
.to_string(),
});
Comment on lines
+795
to
+797
| message: "LiteLLM model wildcards must appear at most once, at the beginning or end; the model was not emitted" | ||
| .to_string(), | ||
| }); |
Signed-off-by: FenjuFu <[email protected]>
Signed-off-by: FenjuFu <[email protected]>
howardjohn
approved these changes
Aug 7, 2026
Collaborator
|
Thanks @FenjuFu for the PR. Are you able to help with any of the other checkboxes in the issue? |
3 of 27 tasks
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
*, prefix wildcards, and suffix wildcardsopenai/*by omitting a literal wildcard fromparams.modelThis addresses the wildcard model conversion checkbox in #2607. Model-group aliases and other importer follow-ons remain out of scope.
Validation
git diff --checkLocalConfigloader in the golden teststatic.rust-lang.orgfailed with a TLS handshake error; GitHub Actions will run the Rust test suite