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
fix: prompt for catalog provider API keys and clarify update behavior (#7)
## Related Issue
No linked issue — problem explained below.
## Problem
Connecting a provider from the models.dev catalog in `/login` or
`/provider` failed with `Environment variable "X" is not set or is
empty.` instead of asking for an API key. The same gate also broke the
OpenAI (API key) and Anthropic (API key) login entries, which route
through the same path, and `pythinker provider catalog add` had no way
to pass a key directly. Separately, the update banner and `/update`
implied Homebrew installs auto-update when they deliberately do not, and
the native install scripts pointed at nonexistent release assets.
## What changed
- Catalog provider login now falls back to the API key input dialog when
the provider's environment variable is unset or empty, and stores the
entered key in `config.toml` via the existing `api_key` provider field.
When the env var is set, behavior is unchanged.
- `pythinker provider catalog add` gains `--api-key <key>`, taking
precedence over `--api-key-env` and the catalog's declared env var;
error messages now mention the flag.
- `/update` and the startup update notice state that Homebrew installs
do not auto-update and show the native installer command for automatic
background updates.
- The native install scripts download the correct published release
assets.
- Site: legacy downloads popup and Python download milestone highlight.
Tests: new coverage for the prompt fallback (env set / unset /
undeclared / cancelled) in the TUI, and for `--api-key` precedence and
Commander wiring in the CLI. Full suite green.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/Pythoughts-labs/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [x] I have linked a related issue, or explained the problem above.
- [x] I have added tests that prove my feature works.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Catalog provider setup now accepts API keys interactively or through
`--api-key`.
- Native installers download verified, architecture-specific release
packages on macOS, Linux, and Windows.
- Added a dismissible community download milestone popup to the website.
- Updated installation guidance, including Homebrew recommendations for
automatic updates.
- **Bug Fixes**
- Provider login no longer fails when the configured API-key environment
variable is missing or empty.
- **Documentation**
- Updated architecture imagery and installation messaging.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Prompt for an API key when connecting a catalog provider whose environment variable is not set, instead of failing with "Environment variable is not set or is empty". Applies to `/login`, `/provider`, and `pythinker provider catalog add`, which now also accepts `--api-key <key>`.
Explain in `/update` and the startup update notice that Homebrew installs do not auto-update, and point to the native installer for automatic background updates.
Show a clear requirement message with the native-installer alternative when the CLI is launched on Node.js older than 26.4, instead of failing with a cryptic flag error.
0 commit comments