fix: resolve duplicate model ids by requested type

This commit is contained in:
Dark-Alex-17 committed 2026-09-03 13:25:37 -06:00
1 parent b50b033520
commit 154330c5a0
2 files changed
+42 -7

No files matched your search

+3 -1
View File
@@ -5263,8 +5263,10 @@ mod tests {
// It deliberately carries one embedding model: an empty `models` list
// would fall back to the full embedded claude catalog and register
// real chat models, breaking the no-chat-model invariant above.
// The test-dual-model pair shares one id across two types, mirroring
// jina:jina-colbert-v2, for the type-aware lookup tests.
let claude: ClientConfig = serde_yaml::from_str(
"type: claude\nmodels:\n - name: test-claude-embedder\n type: embedding\n",
"type: claude\nmodels:\n - name: test-claude-embedder\n type: embedding\n - name: test-dual-model\n type: embedding\n - name: test-dual-model\n type: reranker\n",
)
.unwrap();
let config = AppConfig {