Skip to content

fix(config): validate MINIMAX_TIMEOUT env var to prevent NaN crash#46

Merged
RyanLee-Dev merged 1 commit intomainfrom
fix/validate-timeout-env
Apr 6, 2026
Merged

fix(config): validate MINIMAX_TIMEOUT env var to prevent NaN crash#46
RyanLee-Dev merged 1 commit intomainfrom
fix/validate-timeout-env

Conversation

@EElaineYIN
Copy link
Copy Markdown

Summary

  • Validate MINIMAX_TIMEOUT env var: reject NaN, negative, and non-finite values
  • Previously MINIMAX_TIMEOUT=abc caused AbortSignal.timeout(NaN) → TypeError crash
  • Invalid values now silently fall back to the default 300s timeout

Test plan

  • MINIMAX_TIMEOUT=abc minimax text chat --message "hi" → no crash, uses 300s default
  • MINIMAX_TIMEOUT=30 minimax text chat --message "hi" → uses 30s timeout

🤖 Generated with Claude Code

Non-numeric values like "abc" produced NaN → AbortSignal.timeout(NaN)
threw TypeError. Now invalid values are silently ignored with fallback to 300s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@RyanLee-Dev RyanLee-Dev merged commit 8ffa1fc into main Apr 6, 2026
2 checks passed
@RyanLee-Dev RyanLee-Dev deleted the fix/validate-timeout-env branch April 8, 2026 21:44
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