tirth8205/code-review-graph · error · ValueError
MiniMax refresh model must be '{resolved_model}', got '{mode
Error message
MiniMax refresh model must be '{resolved_model}', got '{model}'. What it means
For provider='minimax', the MiniMax client embeds its resolved model into the provider identity string ('minimax:<model>'). refresh compares the requested model to that resolved model and refuses a mismatch to prevent cross-model vector migration.
Source
Thrown at code_review_graph/embeddings.py:1383
) from exc
raise
identities = {str(row["provider"]) for row in rows}
embedding_store = EmbeddingStore(
graph_store.db_path,
provider=provider,
model=model,
)
try:
if not embedding_store.available or embedding_store.provider is None:
raise RuntimeError(
f"Embedding provider '{provider}' is unavailable in this environment.",
)
resolved_identity = embedding_store.provider.name
if provider == "minimax":
resolved_model = resolved_identity.partition(":")[2]
if model != resolved_model:
raise ValueError(
f"MiniMax refresh model must be '{resolved_model}', got '{model}'.",
)
if identities != {resolved_identity}:
existing = ", ".join(sorted(identities))
raise ValueError(
"Embedding refresh refused: existing embeddings use "
f"{existing}; requested provider resolves to {resolved_identity}.",
)
purged = embedding_store.purge_orphans()
all_nodes: list[GraphNode] = []
for file_path in graph_store.get_all_files():
all_nodes.extend(graph_store.get_nodes_by_file(file_path))
embedded = embedding_store.embed_nodes(all_nodes)
return {"embedded": embedded, "purged": purged}
finally:
embedding_store.close()
View on GitHub (pinned to b58668751a)
Solutions
- Use the exact model from the error message: it tells you the required resolved_model
- Or query SELECT DISTINCT provider FROM embeddings to see the recorded identity ('minimax:<model>') and use that suffix
- If you truly want a new model, re-embed explicitly instead of refreshing
Example fix
# before refresh_embeddings(gs, provider='minimax', model='embo-01') # after refresh_embeddings(gs, provider='minimax', model='minimax-text-embedding-01') # value from error message
Defensive patterns
Strategy: validation
Validate before calling
row = gs._conn.execute("SELECT DISTINCT provider FROM embeddings LIMIT 1").fetchone()
recorded = row["provider"] if row else None
model = recorded.partition(":")[2] or model # use recorded minimax model Try / catch
try:
refresh_embeddings(gs, provider="minimax", model=model)
except ValueError as e:
if "MiniMax refresh model must be" in str(e):
model = str(e).split("'")[1] # take required model from message
refresh_embeddings(gs, provider="minimax", model=model)
else:
raise Prevention
- Read the recorded provider identity from the embeddings table and reuse its model suffix
- Don't guess MiniMax model names; they resolve server-side
- For model changes use full re-embed, not refresh
When it happens
Trigger: Calling refresh_embeddings(provider='minimax', model=X) where the MiniMax provider resolved to a different model Y (identity is 'minimax:Y') — e.g. the service default model changed or you guessed the model name.
Common situations: MiniMax changing/renaming the default model server-side, or passing a model string that differs in casing/precision from what was originally embedded.
Related errors
- MiniMax API error: {base_resp.get('status_msg', 'unknown')}
- MINIMAX_API_KEY environment variable is required for the Min
- Embedding refresh requires an explicit provider and model.
- Embedding provider '{provider}' is unavailable in this envir
- Embedding refresh refused: existing embeddings use {existing
AI-assisted analysis of tirth8205/code-review-graph@b58668751a (2026-08-28).
Data as JSON: /api/errors/a08ab20485170070.
Report an issue: GitHub.