Skip to content

Commit 6eb43e1

Browse files
committed
fix gcp model parsing
1 parent 9d24a83 commit 6eb43e1

File tree

1 file changed

+5
-4
lines changed
  • packages/mistralai_gcp/src/mistralai_gcp

1 file changed

+5
-4
lines changed

packages/mistralai_gcp/src/mistralai_gcp/sdk.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
"mistral-nemo-2407": "mistral-nemo@2407",
2727
}
2828

29-
def get_model_info(model: str) -> Tuple[str,str]:
29+
def get_model_info(model: str) -> Tuple[str, str]:
3030
# if the model requiers the legacy fomat, use it, else do nothing.
31-
model_id = LEGACY_MODEL_ID_FORMAT.get(model, model)
32-
model = "-".join(model.split("-")[:-1])
33-
return model, model_id
31+
if model in LEGACY_MODEL_ID_FORMAT:
32+
return "-".join(model.split("-")[:-1]), LEGACY_MODEL_ID_FORMAT[model]
33+
else:
34+
return model, model
3435

3536

3637

0 commit comments

Comments
 (0)