fix(model): complete MiniMax optimizer role deployment, timeout forwarding, and typing - #255
Conversation
|
Thanks — the role-specific MiniMax routing and timeout forwarding are useful. One initialization blocker remains: |
…rding, and typing
… fresh-import regression
94e54a6 to
1e941d6
Compare
|
Thanks for fixing the fresh-import initialization. Re-reviewing Offline reproduction on Python 3.11: python -m pytest -q tests/test_minimax_backend.py
# 12 passed
python -m pytest -q tests/test_codex_optimizer_backend.py tests/test_minimax_backend.py
# 1 failed, 24 passed
Please make the default-initialization test independent of shared module/environment state: clear the deployment environment variables and use a fresh import in an isolated subprocess, or reload with complete state restoration. Keep the production routing/timeout fix; the remaining request is test isolation, not removing coverage. Please run the ordered pair and full suite after the change. I would prefer not to merge a known failing CI test and repair it on |
|
Yifan Yang (@Yif-Yang) thanks for reviewing this! I've updated I isolated the environment state in |
|
Re-reviewed python -m pytest -q tests/test_codex_optimizer_backend.py tests/test_minimax_backend.py
# 25 passedThe fresh import/reload and cleanup of the deployment environment values address that default-initialization test's dependence on a preceding Codex test. I am no longer treating that reproduction as an outstanding blocker on this PR. Please retain the explicit cross-file order in the regression receipt, not just the standalone MiniMax result. There are only minor trailing-whitespace nits in the changed test file from The exact-head official CI run still awaits maintainer approval. This passing local reproduction does not substitute for the full suite, and does not automatically apply to the separate fixture implementation currently in #262. This comment is not merge approval. |
Problem
In
skillopt.model.minimax_backendand the top-levelskillopt.modeldispatcher:chat_targetdropped thetimeoutparameter when routing tominimax_chat, ignoring caller-configured timeouts.chat_optimizer_messageswas not implemented inminimax_backend.py, forcing the dispatcher to fall back to_minimax.chat_target_messages(..., stage="optimizer")with mismatched target deployment resolution.set_optimizer_deploymentwas missing inminimax_backend.py, causingskillopt.model.set_optimizer_deployment()to omit MiniMax from optimizer deployment updates.minimax_backend.py(dict[int]) were malformed generics.Root Cause
MiniMax backend support previously focused on the target path, leaving optimizer role deployment registration, timeout forwarding, and structured message dispatcher entry points incomplete.
Solution
OPTIMIZER_DEPLOYMENTandset_optimizer_deploymenttoskillopt.model.minimax_backend.chat_optimizer_messagesinminimax_backend.pyusingOPTIMIZER_DEPLOYMENT.timeoutacrosschat_target,chat_optimizer, andchat_optimizer_messages.tuple[str, dict[str, int]]._minimax.set_optimizer_deploymentinskillopt.model.set_optimizer_deployment.tests/test_minimax_backend.pyvalidating deployment resolution, tool calls, and timeout propagation.Testing
pytest tests/test_minimax_backend.py(9/9 passed).ruff check(clean).Risk
Low. Additive and backwards-compatible with existing backend configuration.