You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcode provider add --use fails with "Test the saved provider configuration" but saves nothing #157
Test the saved provider configuration before activating it
Nothing is saved. mcode provider list does not show the provider, and mcode provider test <name> reports "Model provider not found".
Two problems:
The message says "Test the saved provider configuration", but the provider
was never written — the check runs before any persistence.
Headless users get a wrong signal afterwards: mcode exec fails with
"Sign in to MiniMax to use Agent features", which sends people off to mcode login when the real problem is the provider was never stored.
Retrying without --use does work ("Provider added: my-provider"), followed by mcode provider test — so the workaround is just dropping --use.
Suggestion: either save first and then require provider test before
activating, or make the message state that nothing was saved and print the
working sequence. Also worth updating the README example, since it sends every
new BYOK user into this on their first run.
The fix is implemented in #169. Local validation and all three platform CI checks passed, but GitHub currently blocks merging pending the required independent approval. The PR has not merged yet.
mcode provider add --use now tests the first listed model before saving the provider and selecting it as the default. If the connection test fails, the command exits nonzero, explicitly states that nothing was saved or selected, and preserves the existing configuration. Omitting --use still saves without testing or changing the default.
Verified locally with the built CLI and an offline HTTP fixture, including successful activation and subsequent exec without managed login, and HTTP 401 failure without persistence. The full local verification passed all 14 macOS gates; startup/smoke and BYOK tests were also rerun before the merge attempt.
Keeping this issue open until the PR merges. No new npm release has been published as part of this change. Thanks for the clear reproduction.
Activity
hetaoBackend commentedon Sep 18, 2026
The fix is implemented in #169. Local validation and all three platform CI checks passed, but GitHub currently blocks merging pending the required independent approval. The PR has not merged yet.
mcode provider add --usenow tests the first listed model before saving the provider and selecting it as the default. If the connection test fails, the command exits nonzero, explicitly states that nothing was saved or selected, and preserves the existing configuration. Omitting--usestill saves without testing or changing the default.Verified locally with the built CLI and an offline HTTP fixture, including successful activation and subsequent
execwithout managed login, and HTTP 401 failure without persistence. The full local verification passed all 14 macOS gates; startup/smoke and BYOK tests were also rerun before the merge attempt.Keeping this issue open until the PR merges. No new npm release has been published as part of this change. Thanks for the clear reproduction.
hetaoBackend commentedon Sep 18, 2026
Update: #169 has now merged as 149d764, and this issue was closed by the merge. The approval blocker mentioned above no longer applies.
The fix is now in
main. Local built-CLI tests and Linux/macOS/Windows CI passed. This source merge does not itself publish a new npm version.