Backtestslitellmrun-20261111-220245#49574
[Bug]: minimax provider silently drops top-level reasoning_effort (M3.1-Flash supports low|medium|high|max)
Our patch was judged better than the merged fix.
In this judgment, Patch A = our agent, Patch B = the merged fix.
Both patches make the independent tests pass, so the decision rests on root-cause fit, risk, and scope. Patch A fixes the exact cause the issue names: it adds reasoning_effort to MinimaxChatConfig.get_supported_openai_params unconditionally, so the parameter survives drop_params and is forwarded for the provider to judge, matching how the OpenAI-compatible base behaves. Its map_openai_params override is small and defensible (unwraps an {'effort': ...} object to the bare level, skips the 'default' sentinel, and uses the existing warn_dropped_reasoning helper when nothing usable remains), and its tests drive a real litellm.completion through an httpx MockTransport and assert the body carries each of low/medium/high/max. Patch B gates the whitelist on litellm.supports_reasoning, which makes the fix depend on cost-map data: it adds a new MiniMax-M3.1-Flash entry with pricing figures the issue gives no basis for and a reasoning_effort_levels list that includes 'xhigh', contradicting the issue's stated low|medium|high|max set. It then adds a blanket '^minimax/' generalization rule marking every unmapped MiniMax id as reasoning-capable, which is a provider-wide behavior change well beyond the ask. Because litellm normally loads the cost map remotely, B's fix only reaches production once the hosted JSON updates, and in deployments pinned to an older map it would still drop the parameter; A has no such dependency. B's extra tests are thorough but mostly exercise the new cost-map rule and the fabricated entry rather than the reported bug. A resolves the issue at its root with less risk and tighter scope, so A is the better fix.
Four judges ruled on this ticket in parallel, and the verdict comes from counting their votes. Each saw the issue and the two patches, labelled A and B in random order (two of them saw ours as A), with issue links and version numbers removed. Where tests could check the fix, they also saw the results of tests a separate agent wrote for the issue, run on both patches. None was told which patch was ours. The reasoning above is one judge's, shown verbatim.
Solve
39m 31s
Wall-clock time in the container
Full test suite
Not run
The harness did not reach the test stage
Contamination audit
Clean
No sign the agent saw the real fix
Patch size
129vs 226 merged
Changed lines, ours vs merged
The issue
View on GitHubWhat happened
reasoning_effort sent at the top level of a Chat Completions request to a MiniMax deployment is silently dropped: it never reaches the upstream and no warning is logged.
- litellm: 1.106.6 (proxy, image
ghcr.io/berriai/litellm:latest) - deployment:
model_name: minimax-flash→litellm_params.model: minimax/MiniMax-M3.1-Flash
Repro
curl -s $LITELLM/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"model":"minimax-flash","messages":[{"role":"user","content":"..."}],"max_tokens":1500,"reasoning_effort":"low"}'
curl -s $LITELLM/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"model":"minimax-flash","messages":[{"role":"user","content":"..."}],"max_tokens":1500,"reasoning_effort":"high"}'
Observed
usage.completion_tokens_details.reasoning_tokens is the same for low and high — the parameter is stripped before the upstream call.
Proof the drop is on the litellm side, not MiniMax:
| Request | reasoning_tokens (max_tokens 1500) |
|---|---|
extra_body: {"reasoning_effort": "low"} | 410 |
extra_body: {"reasoning_effort": "high"} | 1499 |
top-level reasoning_effort: "low" / "high" | identical (dropped) |
same deployment as openai/MiniMax-M3.1-Flash + top-level reasoning_effort | low 410 / high 1499 (works) |
Cause
litellm/llms/minimax/chat/transformation.py::get_supported_openai_params only appends reasoning_split (and thinking when supports_reasoning), so reasoning_effort is not in the accepted-params set for MiniMax deployment names and gets removed by the drop-params path.
MiniMax-M3.1-Flash does accept the effort levels directly — verified against the upstream API, low|medium|high|max all work when the parameter is forwarded.
Related
- #48933 (merged 2026-10-30) added "requested reasoning level was dropped" WARNINGs to the remaining drop sites for
anthropic,bedrock,azure_ai,deepseek,fal— minimax is still silent, so callers get no signal at all. - #47515 attempts to preserve Flash effort levels, but it is currently
mergeable=false(dirty) and CLA-unsigned since 2026-10-20.
Ask
Whitelist reasoning_effort for the minimax provider so it is forwarded (Flash supports low|medium|high|max), or — if that is intentional — emit the same drop WARNING added in #48933 so the silent stripping stops being invisible.
The two patches
litellm/llms/minimax/chat/transformation.pyindex f397bf7fbb..e2ada3f8ec 100644@@ -5,11 +5,25 @@ MiniMax OpenAI transformation config - extends OpenAI chat config for MiniMax's from typing import Final import litellm+from litellm.litellm_core_utils.core_helpers import as_str_mapping+from litellm.litellm_core_utils.reasoning_effort_utils import warn_dropped_reasoning from litellm.litellm_core_utils.url_utils import join_api_base from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig from litellm.secret_managers.main import get_secret_str from litellm.types.llms.openai import AllMessageValues, ChatCompletionToolParam +_NON_STRING_EFFORT_REASON: Final = "MiniMax takes reasoning_effort only as a level name such as 'low' or 'high'."+++def _minimax_reasoning_effort(value: object) -> str | None:+ """MiniMax reads reasoning_effort as a bare level name, so an OpenAI-style {"effort": ...}+ object is unwrapped to its level."""+ if isinstance(value, str):+ return value+ fields: Final = as_str_mapping(value)+ effort: Final = fields.get("effort") if fields is not None else None+ return effort if isinstance(effort, str) else None+ class MinimaxChatConfig(OpenAIGPTConfig): """@@ -81,10 +95,12 @@ class MinimaxChatConfig(OpenAIGPTConfig): def get_supported_openai_params(self, model: str) -> list: """ Get supported OpenAI parameters for MiniMax.- Adds reasoning_split and thinking to the list of supported params.+ Adds reasoning_effort, reasoning_split and thinking to the list of supported params.+ reasoning_effort is forwarded as-is for MiniMax to judge: MiniMax-M3.1-Flash takes+ low, medium, high and max. """ base_params: Final = super().get_supported_openai_params(model=model)- additional_params: Final = ["reasoning_split"]+ additional_params: Final = ["reasoning_effort", "reasoning_split"] # Add thinking parameter if model supports reasoning try:@@ -94,3 +110,29 @@ class MinimaxChatConfig(OpenAIGPTConfig): pass return base_params + additional_params++ def map_openai_params(+ self,+ non_default_params: dict,+ optional_params: dict,+ model: str,+ drop_params: bool,+ ) -> dict:+ mapped: Final = super().map_openai_params(+ non_default_params=non_default_params,+ optional_params=optional_params,+ model=model,+ drop_params=drop_params,+ )+ requested: Final = mapped.pop("reasoning_effort", None)+ # "default" is litellm's "use the provider's default" sentinel, not a MiniMax level.+ if requested is None or requested == "default":+ return mapped+ effort: Final = _minimax_reasoning_effort(requested)+ if effort is None:+ warn_dropped_reasoning(+ "reasoning_effort", requested, model, _NON_STRING_EFFORT_REASON, drop_params_gated=False+ )+ return mapped+ mapped["reasoning_effort"] = effort+ return mappedtests/unit/llms/minimax/chat/test_transformation.pyindex 2645b2832a..da2b92aadf 100644@@ -2,9 +2,15 @@ Test MiniMax OpenAI-compatible API support """ +import json+import logging from unittest.mock import MagicMock, patch +import httpx+import pytest+ import litellm+from litellm.llms.custom_httpx.http_handler import HTTPHandler from litellm.llms.minimax.chat.transformation import MinimaxChatConfig @@ -102,6 +108,83 @@ def test_minimax_provider_config_manager(): assert isinstance(config, MinimaxChatConfig) +FLASH_MODEL = "MiniMax-M3.1-Flash"+++def _send_and_capture_body(**kwargs) -> dict:+ captured: list[httpx.Request] = []++ def respond(request: httpx.Request) -> httpx.Response:+ captured.append(request)+ return httpx.Response(+ 200,+ json={+ "id": "chatcmpl-minimax",+ "object": "chat.completion",+ "created": 1234567890,+ "model": FLASH_MODEL,+ "choices": [+ {"index": 0, "message": {"role": "assistant", "content": "hi"}, "finish_reason": "stop"}+ ],+ "usage": {"prompt_tokens": 10, "completion_tokens": 5, "total_tokens": 15},+ },+ )++ litellm.completion(+ model=f"minimax/{FLASH_MODEL}",+ messages=[{"role": "user", "content": "hello"}],+ api_key="fake-key",+ client=HTTPHandler(client=httpx.Client(transport=httpx.MockTransport(respond))),+ **kwargs,+ )+ return json.loads(captured[0].content)+++def test_minimax_supported_params_include_reasoning_effort():+ assert "reasoning_effort" in MinimaxChatConfig().get_supported_openai_params(model=FLASH_MODEL)+ assert "reasoning_effort" in MinimaxChatConfig().get_supported_openai_params(model="MiniMax-M3")+++@pytest.mark.parametrize("effort", ["low", "medium", "high", "max"])+def test_minimax_completion_forwards_top_level_reasoning_effort(effort):+ """Regression: top-level reasoning_effort was stripped by drop_params before reaching MiniMax."""+ body = _send_and_capture_body(reasoning_effort=effort, drop_params=True)+ assert body["reasoning_effort"] == effort+ assert "extra_body" not in body+++def test_minimax_completion_forwards_reasoning_effort_without_drop_params():+ body = _send_and_capture_body(reasoning_effort="high")+ assert body["reasoning_effort"] == "high"+++def test_minimax_completion_omits_default_reasoning_effort_sentinel():+ body = _send_and_capture_body(reasoning_effort="default", drop_params=True)+ assert "reasoning_effort" not in body+++def test_minimax_unwraps_reasoning_effort_object_to_level():+ mapped = MinimaxChatConfig().map_openai_params(+ non_default_params={"reasoning_effort": {"effort": "low"}},+ optional_params={},+ model=FLASH_MODEL,+ drop_params=False,+ )+ assert mapped["reasoning_effort"] == "low"+++def test_minimax_warns_when_reasoning_effort_has_no_level(caplog):+ with caplog.at_level(logging.WARNING, logger="LiteLLM"):+ mapped = MinimaxChatConfig().map_openai_params(+ non_default_params={"reasoning_effort": {"summary": "auto"}},+ optional_params={},+ model=FLASH_MODEL,+ drop_params=False,+ )+ assert "reasoning_effort" not in mapped+ assert any("Dropping reasoning_effort" in record.getMessage() for record in caplog.records)++ if __name__ == "__main__": # Run basic tests that don't require API key print("Testing MiniMax Chat Config...")
litellm/llms/minimax/chat/transformation.pyindex f397bf7fbb9..84ed8a56430 100644@@ -11,6 +11,13 @@ from litellm.secret_managers.main import get_secret_str from litellm.types.llms.openai import AllMessageValues, ChatCompletionToolParam +def _supports_reasoning(model: str) -> bool:+ try:+ return litellm.supports_reasoning(model=model, custom_llm_provider="minimax")+ except Exception:+ return False++ class MinimaxChatConfig(OpenAIGPTConfig): """ MiniMax OpenAI configuration that extends OpenAIGPTConfig.@@ -81,16 +88,8 @@ class MinimaxChatConfig(OpenAIGPTConfig): def get_supported_openai_params(self, model: str) -> list: """ Get supported OpenAI parameters for MiniMax.- Adds reasoning_split and thinking to the list of supported params.+ Adds reasoning_split, plus thinking and reasoning_effort when the cost map, or its+ minimax/ fallback rule for unlisted models, says the model supports reasoning. """- base_params: Final = super().get_supported_openai_params(model=model)- additional_params: Final = ["reasoning_split"]-- # Add thinking parameter if model supports reasoning- try:- if litellm.supports_reasoning(model=model, custom_llm_provider="minimax"):- additional_params.append("thinking")- except Exception:- pass-- return base_params + additional_params+ reasoning_params: Final = ("thinking", "reasoning_effort") if _supports_reasoning(model) else ()+ return [*super().get_supported_openai_params(model=model), "reasoning_split", *reasoning_params]litellm/model_prices_and_context_window_backup.jsonindex 600c195c2c7..e1cbb953c5b 100644@@ -43107,6 +43107,29 @@ "max_input_tokens": 1000000, "max_output_tokens": 128000 },+ "minimax/MiniMax-M3.1-Flash": {+ "input_cost_per_token": 1.5e-07,+ "output_cost_per_token": 6e-07,+ "cache_read_input_token_cost": 1.5e-08,+ "litellm_provider": "minimax",+ "mode": "chat",+ "source": "https://platform.minimax.io/docs/guides/pricing-paygo",+ "supports_function_calling": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_none_reasoning_effort": false,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "reasoning_effort_levels": [+ "low",+ "medium",+ "high",+ "xhigh",+ "max"+ ],+ "supports_vision": true,+ "max_input_tokens": 1000000+ }, "minimax/minimax-latest": { "alias_of": "minimax/MiniMax-M3" },@@ -65211,6 +65234,14 @@ "supports_reasoning": true } },+ {+ "name": "minimax-reasoning-baseline",+ "pattern": "^minimax/",+ "description": "Any MiniMax model id under the minimax/ namespace, anchored so only that provider's ids match. MiniMax ships reasoning models faster than this registry names them, so an id the map has not described yet is treated as reasoning-capable and keeps the caller's reasoning_effort and thinking instead of dropping them. Rules lose to exact entries, so mapped speech, video and image models are unaffected. Carries no mode and no pricing, so cost stays on the standard unpriced behavior.",+ "model_info": {+ "supports_reasoning": true+ }+ }, { "name": "openai-reasoning-family-baseline", "pattern": "^(?!.*search-api)(?:[a-z0-9_.-]+/)*(?:ft:)?(?:o[1-9]\\d*(?![a-z0-9])|gpt-[5-9](?:\\.\\d+)?(?![0-9.])|(?:gpt-\\d+(?:\\.\\d+)?(?:-[a-z0-9]+)*-)?(?:codex|deep-research|chat-latest)(?![a-z0-9]))",model_prices_and_context_window.jsonindex 600c195c2c7..e1cbb953c5b 100644@@ -43107,6 +43107,29 @@ "max_input_tokens": 1000000, "max_output_tokens": 128000 },+ "minimax/MiniMax-M3.1-Flash": {+ "input_cost_per_token": 1.5e-07,+ "output_cost_per_token": 6e-07,+ "cache_read_input_token_cost": 1.5e-08,+ "litellm_provider": "minimax",+ "mode": "chat",+ "source": "https://platform.minimax.io/docs/guides/pricing-paygo",+ "supports_function_calling": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_none_reasoning_effort": false,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "reasoning_effort_levels": [+ "low",+ "medium",+ "high",+ "xhigh",+ "max"+ ],+ "supports_vision": true,+ "max_input_tokens": 1000000+ }, "minimax/minimax-latest": { "alias_of": "minimax/MiniMax-M3" },@@ -65211,6 +65234,14 @@ "supports_reasoning": true } },+ {+ "name": "minimax-reasoning-baseline",+ "pattern": "^minimax/",+ "description": "Any MiniMax model id under the minimax/ namespace, anchored so only that provider's ids match. MiniMax ships reasoning models faster than this registry names them, so an id the map has not described yet is treated as reasoning-capable and keeps the caller's reasoning_effort and thinking instead of dropping them. Rules lose to exact entries, so mapped speech, video and image models are unaffected. Carries no mode and no pricing, so cost stays on the standard unpriced behavior.",+ "model_info": {+ "supports_reasoning": true+ }+ }, { "name": "openai-reasoning-family-baseline", "pattern": "^(?!.*search-api)(?:[a-z0-9_.-]+/)*(?:ft:)?(?:o[1-9]\\d*(?![a-z0-9])|gpt-[5-9](?:\\.\\d+)?(?![0-9.])|(?:gpt-\\d+(?:\\.\\d+)?(?:-[a-z0-9]+)*-)?(?:codex|deep-research|chat-latest)(?![a-z0-9]))",tests/unit/litellm_core_utils/test_fallback_generalizations.pyindex d8e56c0ae51..b22edaa171a 100644@@ -810,6 +810,35 @@ def test_shipped_wandb_rule_is_anchored_to_the_wandb_namespace(shipped_cost_map) assert matched is None or not matched.get("supports_reasoning"), foreign +@pytest.mark.parametrize("model", ["minimax/MiniMax-M3.2", "minimax/MiniMax-Text-02"])+def test_shipped_rules_flag_unmapped_minimax_ids_as_reasoning(shipped_cost_map, model):+ """MiniMax ships reasoning models faster than the registry names them. The rule+ carries no mode and no pricing, so cost stays on the standard unpriced behavior."""+ assert model not in litellm.model_cost++ info = litellm.get_model_info(model, custom_llm_provider="minimax")+ assert info["litellm_provider"] == "minimax"+ assert info["supports_reasoning"] is True+ assert info.get("mode") is None+ assert not info.get("input_cost_per_token")+ assert not info.get("output_cost_per_token")+++def test_shipped_minimax_rule_is_anchored_to_the_minimax_namespace(shipped_cost_map):+ """``^minimax/`` is anchored, so it cannot leak onto another provider's ids."""+ assert match_capability_generalizations("minimax/some-new-model") == {"supports_reasoning": True}+ for foreign in ("openrouter/minimax/minimax-m3", "notminimax/MiniMax-M3", "together_ai/minimax/MiniMax-M3"):+ matched = match_capability_generalizations(foreign)+ assert matched is None or not matched.get("supports_reasoning"), foreign+++@pytest.mark.parametrize("model", ["speech-02-hd", "MiniMax-H3"])+def test_shipped_minimax_rule_leaves_mapped_entries_alone(shipped_cost_map, model):+ assert f"minimax/{model}" in litellm.model_cost+ assert match_fill_missing_generalizations(f"minimax/{model}", "minimax") is None+ assert litellm.supports_reasoning(model=model, custom_llm_provider="minimax") is False++ def test_shipped_wandb_rule_keeps_reasoning_effort_on_an_unmapped_model(shipped_cost_map): """End to end through the provider config: the gate WandbConfig applies reads the rule, so reasoning_effort is advertised and survives get_optional_params rather thantests/unit/llms/minimax/chat/test_transformation.pyindex 2645b2832aa..d289bdba9bf 100644@@ -2,10 +2,18 @@ Test MiniMax OpenAI-compatible API support """ +import json+from collections.abc import Mapping+from pathlib import Path+from typing import Final, get_args from unittest.mock import MagicMock, patch +import pytest+import respx+ import litellm from litellm.llms.minimax.chat.transformation import MinimaxChatConfig+from litellm.types.llms.openai import REASONING_EFFORT def test_minimax_chat_config():@@ -94,9 +102,7 @@ def test_minimax_provider_config_manager(): from litellm.types.utils import LlmProviders from litellm.utils import ProviderConfigManager - config = ProviderConfigManager.get_provider_chat_config(- model="MiniMax-M2.1", provider=LlmProviders.MINIMAX- )+ config = ProviderConfigManager.get_provider_chat_config(model="MiniMax-M2.1", provider=LlmProviders.MINIMAX) assert config is not None assert isinstance(config, MinimaxChatConfig)@@ -121,3 +127,90 @@ if __name__ == "__main__": print("✓ Provider config manager test passed") print("\n✅ All basic tests passed!")+++@pytest.fixture+def minimax_request_mock(+ local_model_cost_map: None, respx_mock: respx.MockRouter, monkeypatch: pytest.MonkeyPatch+) -> respx.Route:+ monkeypatch.setattr(litellm, "disable_aiohttp_transport", True)+ return respx_mock.post("https://api.minimax.io/v1/chat/completions").respond(+ json={+ "id": "chatcmpl-123",+ "object": "chat.completion",+ "created": 1677652288,+ "model": "MiniMax-M3.1-Flash",+ "choices": [{"index": 0, "message": {"role": "assistant", "content": "Done"}, "finish_reason": "stop"}],+ "usage": {"prompt_tokens": 9, "completion_tokens": 12, "total_tokens": 21},+ }+ )+++def _sent_body(model: str, request_mock: respx.Route, effort: str, drop_params: bool = True) -> Mapping[str, object]:+ litellm.completion(+ model=f"minimax/{model}",+ messages=[{"role": "user", "content": "What is the weather in Oslo?"}],+ api_key="fake-minimax-key",+ reasoning_effort=effort,+ drop_params=drop_params,+ )+ body: Final[Mapping[str, object]] = json.loads(request_mock.calls.last.request.content)+ return body+++def _flash_effort_levels() -> tuple[str, ...]:+ levels: Final = litellm.get_model_info("MiniMax-M3.1-Flash", custom_llm_provider="minimax")[+ "reasoning_effort_levels"+ ]+ assert levels+ return tuple(levels)+++def test_minimax_flash_forwards_every_declared_reasoning_effort(minimax_request_mock: respx.Route) -> None:+ """Issue #49574: reasoning_effort sent to MiniMax-M3.1-Flash was stripped before the upstream call."""+ levels: Final = _flash_effort_levels()+ sent: Final = tuple(+ _sent_body("MiniMax-M3.1-Flash", minimax_request_mock, effort)["reasoning_effort"] for effort in levels+ )+ assert sent == levels+ assert minimax_request_mock.call_count == len(levels)+++def test_minimax_flash_cost_map_entry_is_a_priced_reasoning_model(local_model_cost_map: None) -> None:+ repo_root: Final = Path(litellm.__file__).parent.parent+ entries: Final = tuple(+ json.loads(path.read_text())["minimax/MiniMax-M3.1-Flash"]+ for path in (+ repo_root / "model_prices_and_context_window.json",+ repo_root / "litellm/model_prices_and_context_window_backup.json",+ )+ )+ assert entries[0] == entries[1]++ info: Final = litellm.get_model_info("MiniMax-M3.1-Flash", custom_llm_provider="minimax")+ assert info["supports_reasoning"] is True+ assert set(_flash_effort_levels()) <= set(get_args(REASONING_EFFORT))+ assert 0 < info["cache_read_input_token_cost"] < info["input_cost_per_token"] < info["output_cost_per_token"]+++@pytest.mark.parametrize("model", ["MiniMax-M3.2", "MiniMax-Text-02"])+def test_minimax_forwards_reasoning_effort_for_an_unmapped_model(minimax_request_mock: respx.Route, model: str) -> None:+ """A MiniMax model newer than the cost map keeps reasoning_effort and thinking through the fallback rule."""+ assert f"minimax/{model}" not in litellm.model_cost+ assert "thinking" in MinimaxChatConfig().get_supported_openai_params(model=model)+ assert _sent_body(model, minimax_request_mock, "low", drop_params=False)["reasoning_effort"] == "low"+++@pytest.mark.respx(assert_all_called=False)+def test_minimax_drops_reasoning_effort_for_a_known_non_reasoning_model(+ minimax_request_mock: respx.Route, monkeypatch: pytest.MonkeyPatch+) -> None:+ monkeypatch.setitem(litellm.model_cost["minimax/MiniMax-M3"], "supports_reasoning", False)+ litellm.get_model_info.cache_clear()++ assert "reasoning_effort" not in MinimaxChatConfig().get_supported_openai_params(model="MiniMax-M3")+ assert "reasoning_effort" not in _sent_body("MiniMax-M3", minimax_request_mock, "low")++ with pytest.raises(litellm.UnsupportedParamsError, match="reasoning_effort"):+ _sent_body("MiniMax-M3", minimax_request_mock, "low", drop_params=False)+ assert minimax_request_mock.call_count == 1tests/unit/llms/test_cache_control_and_reasoning.pyindex be1ba1e7dbd..82406d114a9 100644@@ -76,6 +76,19 @@ def test_minimax_supports_thinking_param(): assert "reasoning_split" in supported_params +def test_minimax_forwards_reasoning_effort():+ config = MinimaxChatConfig()++ optional_params = config.map_openai_params(+ non_default_params={"reasoning_effort": "low"},+ optional_params={},+ model="minimax/MiniMax-M3.1-Flash",+ drop_params=True,+ )++ assert optional_params == {"reasoning_effort": "low"}++ def test_zai_preserves_cache_control_in_messages(): """ZAI should NOT strip cache_control from messages.""" config = ZAIChatConfig()