feat(modeldata): support model-list aliases in metadata lookup#175
feat(modeldata): support model-list aliases in metadata lookup#175SantiagoDePolonia merged 1 commit intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe pull request introduces alias resolution functionality for models by adding an Changes
Sequence DiagramsequenceDiagram
participant Caller as Caller
participant Resolve as Resolve()
participant Direct as Direct Lookup
participant Reverse as Reverse Lookup
participant Alias as Alias Resolution<br/>(aliasTargetsByID)
participant Score as Score Candidates
participant ModelRef as Resolve ModelRef
Caller->>Resolve: Resolve(list, providerType, modelID)
Resolve->>Direct: Try providerType + modelID
Direct-->>Resolve: Found or Not
alt Not Found
Resolve->>Reverse: Try reverse lookup<br/>via providerModelByActualID
Reverse-->>Resolve: Found or Not
alt Still Not Found
Resolve->>Alias: Check aliasTargetsByID[modelID]
Alias-->>Resolve: List of alias targets
alt Has Targets
Resolve->>Score: Score candidates by<br/>ProviderType match
Score-->>Resolve: Scored targets
Resolve->>ModelRef: Select highest-scoring<br/>ModelRef
ModelRef-->>Resolve: ModelRef + ProviderType
end
end
end
Resolve-->>Caller: ModelRef or nil
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
models[*].aliaseswhen resolving metadata from the external ai-model-listprovider_model_idwhile keeping compatibility with legacycustom_model_id/v1/modelstied to upstream provider model IDs and use aliases only for internal metadata enrichmentTesting
Summary by CodeRabbit
provider/model-name), for flexible model references.