-
Notifications
You must be signed in to change notification settings - Fork 0
[codex] align docs with managed billing access #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ This page mirrors the canonical `SKILL.md` at [`skills/mogplex-auth/SKILL.md`](h | |
|
|
||
| ```yaml | ||
| name: mogplex-auth | ||
| description: Guides the user through the Mogplex CLI's in-app login flow, credential precedence, and troubleshooting. Use when the user asks to sign in, switch accounts, store a provider key, or when a Mogplex command fails with an auth error. | ||
| description: Guides the user through the Mogplex CLI's in-app login flow, credential precedence, and troubleshooting. Use when the user asks to sign in, switch accounts, debug env-var overrides, or when a Mogplex command fails with an auth error. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning: mogplex-auth skill description still references 'store a provider key' use case The SKILL.md to: This is consistent with the PR intent. However, the body of this skill file still includes guidance about |
||
| ``` | ||
|
|
||
| ## Body | ||
|
|
@@ -22,20 +22,8 @@ The Mogplex CLI authenticates **in-app**. There is no `mogplex login status` sub | |
|
|
||
| The cockpit picks credentials in a fixed order: | ||
|
|
||
| 1. **Provider env var in the current shell.** If set, it wins — no matter what is stored on disk. | ||
|
|
||
| | Provider | Env var | | ||
| | --- | --- | | ||
| | Mogplex | `MOGPLEX_API_KEY` | | ||
| | Anthropic | `ANTHROPIC_API_KEY` | | ||
| | OpenAI | `OPENAI_API_KEY` | | ||
| | Google | `GOOGLE_GENERATIVE_AI_API_KEY` | | ||
| | Groq | `GROQ_API_KEY` | | ||
| | Mistral | `MISTRAL_API_KEY` | | ||
| | DeepSeek | `DEEPSEEK_API_KEY` | | ||
| | xAI | `XAI_API_KEY` | | ||
| | Cohere | `COHERE_API_KEY` | | ||
| | Vercel | `VERCEL_API_TOKEN` | | ||
| 1. **Auth env var in the current shell.** `MOGPLEX_API_KEY` and legacy local | ||
| provider env vars can override what is stored on disk. | ||
|
|
||
| 2. **Stored credentials** in `~/.mogplex/auth.json` (mode `0600`). | ||
| 3. **No credentials** → the cockpit's in-app login screen appears. | ||
|
|
@@ -55,24 +43,17 @@ mogplex | |
|
|
||
| A browser flow opens; the cockpit listens on a local callback and stores the token in `~/.mogplex/auth.json`. The user does the click-through; you do not drive the browser. | ||
|
|
||
| Account-backed login unlocks synced model catalog, remote MCP server definitions, and hosted model access. | ||
| Account-backed login unlocks synced model catalog, remote MCP server | ||
| definitions, and plan-backed hosted model access. | ||
|
|
||
| ### Alternative: store a provider key in-app | ||
| ### Compatibility: provider env var | ||
|
|
||
| In the login screen (or via `/login` in the composer), the user can pick **Use a provider API key** and paste a key. Stored in `~/.mogplex/auth.json` with mode `0600`. | ||
| Provider env vars are compatibility and development escape hatches. They are | ||
| not the normal customer setup path for billed Mogplex accounts. | ||
|
|
||
| Supported providers: Anthropic, OpenAI, Google, Groq, Mistral, DeepSeek, xAI, Cohere, Vercel AI Gateway. | ||
|
|
||
| ### Alternative: provider env var | ||
|
|
||
| For CI or ephemeral shells: | ||
|
|
||
| ```bash | ||
| export OPENAI_API_KEY=sk-... | ||
| mogplex | ||
| ``` | ||
|
|
||
| Do not write keys into shell rc files on the user's behalf. Suggest it; let them do it. | ||
| Do not write keys into shell rc files on the user's behalf. If a user is | ||
| explicitly working in a development or compatibility flow, describe the env-var | ||
| override and let them set it themselves. | ||
|
|
||
| ## Sanity-check env vars (advisory) | ||
|
|
||
|
|
@@ -89,7 +70,7 @@ Never echo a raw key. | |
| | Symptom | What to recommend | | ||
| | --- | --- | | ||
| | Login screen appears at every launch | No credential stored and no env var set. Pick a path on the login screen. | | ||
| | Login succeeds but prompts fail with "no model access" | Account-backed login is active but the hosted account lacks model access. Direct the user to [Web Settings](https://www.mogplex.com/web/settings) to add a provider key. | | ||
| | Login succeeds but prompts fail with "no model access" | Account-backed login is active but the hosted account lacks model access. Direct the user to [Available Models](https://www.mogplex.com/web/models) and [Plans & Billing](https://www.mogplex.com/plans-and-billing). | | ||
| | Cockpit behaves differently than expected after `/login` | An env var is overriding the stored credential. Have the user `unset` it and relaunch. | | ||
| | User wants to switch accounts | Type `/logout` in the composer, then `/login` (or relaunch). | | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This update removes the per-provider environment-variable mapping from the authentication guide and replaces it with a generic “legacy local provider env vars” phrase, but
Configuration and Flagsstill sends users to this section for the exact variable names (content/docs/cli/guides/configuration-and-flags.mdx:33). In CI or compatibility flows, users now cannot reliably determine which variable to set for non-Mogplex providers, which can cause silent auth fallback and failed runs.Useful? React with 👍 / 👎.