Add current MiniMax model recipes - #23
Conversation
|
Hi, thanks a lot for the contribution. I have a few remarks before meeting though |
| @@ -0,0 +1,68 @@ | |||
| """wdoc-specific model metadata registered with LiteLLM.""" | |||
There was a problem hiding this comment.
I don't see how this model is "wdoc-specific"
| @@ -0,0 +1,68 @@ | |||
| """wdoc-specific model metadata registered with LiteLLM.""" | |||
|
|
|||
There was a problem hiding this comment.
I'd prefer if the file was called add_extra_litellm_models_metadata.py to make it more explicit
| "thinking": ["always_on"], | ||
| "supports_reasoning": True, | ||
| }, | ||
| } |
There was a problem hiding this comment.
To make it easier to maintain and detect stale values, please add as comments in the code the URLs you used to get those values.
| "supports_reasoning": True, | ||
| }, | ||
| } | ||
|
|
There was a problem hiding this comment.
Have you considered making a PR to litellm directly too?
|
|
||
| def register_wdoc_models(litellm: Any) -> None: | ||
| """Register wdoc's model recipes in LiteLLM's cost and provider catalogs.""" | ||
| litellm.register_model(MINIMAX_MODELS) |
There was a problem hiding this comment.
Before registering the model, maybe we should check in litellm's models metadata if there isn't already those values? Otherwise in the long run if/when litellm has those values we might have stale values.
| ) from err | ||
|
|
||
|
|
||
| def register_wdoc_models(litellm: Any) -> None: |
There was a problem hiding this comment.
I'd prefer a more generic name for that func like add_extra_models_metadata
| """ | ||
| import litellm | ||
|
|
||
| register_wdoc_models(litellm) |
There was a problem hiding this comment.
By principle I think i'd prefer using a try block somewhere. Maybe make that func just a wrapper that applies a try block to a real _func. If the block fails log a warning with the error message or something
Reason: Add current MiniMax model recipes and regional endpoint metadata to wdoc's LiteLLM model loader.
Checks:
uv run --no-project --with 'litellm==1.84.0' --with 'pytest>=8.3.4' pytest -q tests/test_litellm_models.pyuv run --no-project --with 'litellm>=1.84.0' --with 'pytest>=8.3.4' pytest -q tests/test_litellm_models.pyuv run --no-project --with 'ruff==0.14.1' ruff format --check wdoc/utils/customs/litellm_models.py wdoc/wdoc.py tests/test_litellm_models.pyuv run --no-project --with 'ruff==0.14.1' ruff check wdoc/utils/customs/litellm_models.py tests/test_litellm_models.pypython3 -m py_compile wdoc/utils/customs/litellm_models.py wdoc/wdoc.py tests/test_litellm_models.pygit diff --check origin/main...HEAD