Skip to content

Commit c5ee534

Browse files
committed
embedding registry model provider missing
1 parent 022f375 commit c5ee534

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ jobs:
248248
tag_name: ${{ steps.version.outputs.version }}
249249
name: Release ${{ steps.version.outputs.version }}
250250
body: |
251-
## Deadend CLI ${{ steps.version.outputs.version }}
251+
## Deadend CLI ${{ steps.version.outputs.version }} Stable version;
252252
253253
### Server Downloads (RPC Server)
254254
@@ -278,6 +278,8 @@ jobs:
278278
tar -xzf deadend-<platform>-<arch>.tar.gz
279279
cd deadend-<platform>-<arch>
280280
sudo cp -r * /usr/local/
281+
282+
Hope you enjoy the new release, let me know if this works for macos and linux
281283
```
282284
files: |
283285
artifacts/**/*

deadend_cli/deadend_agent/src/deadend_agent/models/registry.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,23 @@ async def batch_embed(self, input_texts: list[str]) -> list[dict]:
6969
#
7070
# NOTE:
7171
# - `self.model` should follow the LiteLLM model name convention,
72-
# e.g. "openai:text-embedding-3-small" or "openrouter:qwen/qwen3-embedding-8b".
72+
# e.g. "openai/text-embedding-3-small" or "openrouter/qwen/qwen3-embedding-8b".
7373
# - API keys / base URLs are expected to be configured via LiteLLM
74-
# environment variables or global configuration.
75-
data = await aembedding(
76-
model=self.model,
77-
input=input_texts,
78-
)
74+
# environment variables or passed explicitly below.
75+
kwargs: dict = {
76+
"model": self.model,
77+
"input": input_texts,
78+
}
79+
80+
# For custom endpoints, we need api_key and api_base
81+
if self.base_url:
82+
kwargs["api_base"] = self.base_url
83+
84+
# API key handling
85+
if self.api_key:
86+
kwargs["api_key"] = self.api_key
87+
88+
data = await aembedding(**kwargs)
7989
except Exception as exc: # pragma: no cover - defensive logging
8090
logger.error("Embedding call via LiteLLM failed: %s", exc)
8191
raise ValueError(f"Embedding API error: {exc}") from exc
@@ -168,8 +178,10 @@ def _initialize_models(self, config: Config):
168178
# Use the first embedding spec we encounter as the embedder client
169179
if self.embedder_model is None:
170180
# api_key, base_url = self._resolve_embedding_credentials(spec)
181+
# LiteLLM expects model identifiers in the form "provider/model_name"
182+
# e.g. "openai/text-embedding-3-small" or "openrouter/qwen/qwen3-embedding-8b".
171183
self.embedder_model = EmbedderClient(
172-
model_name=spec.model_name,
184+
model_name=f"{spec.provider}/{spec.model_name}",
173185
api_key=spec.api_key,
174186
base_url=spec.base_url,
175187
)

0 commit comments

Comments
 (0)