Skip to content

Add current MiniMax model recipes - #23

Open
octo-patch wants to merge 1 commit into
thiswillbeyourgithub:mainfrom
octo-patch:octo/20260801-model-add-recvqs4oL2zDzm
Open

Add current MiniMax model recipes#23
octo-patch wants to merge 1 commit into
thiswillbeyourgithub:mainfrom
octo-patch:octo/20260801-model-add-recvqs4oL2zDzm

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Add current MiniMax model recipes and regional endpoint metadata to wdoc's LiteLLM model loader.

  • Register MiniMax-M3 and MiniMax-M2.7 context, pricing, cache, input modality, and thinking metadata.
  • Add global and CN endpoint recipes with validation for unsupported selections.
  • Cover provider catalog registration, model metadata, and every configured endpoint.

Checks:

  • uv run --no-project --with 'litellm==1.84.0' --with 'pytest>=8.3.4' pytest -q tests/test_litellm_models.py
  • uv run --no-project --with 'litellm>=1.84.0' --with 'pytest>=8.3.4' pytest -q tests/test_litellm_models.py
  • uv run --no-project --with 'ruff==0.14.1' ruff format --check wdoc/utils/customs/litellm_models.py wdoc/wdoc.py tests/test_litellm_models.py
  • uv run --no-project --with 'ruff==0.14.1' ruff check wdoc/utils/customs/litellm_models.py tests/test_litellm_models.py
  • python3 -m py_compile wdoc/utils/customs/litellm_models.py wdoc/wdoc.py tests/test_litellm_models.py
  • git diff --check origin/main...HEAD

@thiswillbeyourgithub

Copy link
Copy Markdown
Owner

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."""

@thiswillbeyourgithub thiswillbeyourgithub Aug 1, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this model is "wdoc-specific"

@@ -0,0 +1,68 @@
"""wdoc-specific model metadata registered with LiteLLM."""

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
},
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
},
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer a more generic name for that func like add_extra_models_metadata

Comment thread wdoc/wdoc.py
"""
import litellm

register_wdoc_models(litellm)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants