Every API-key provider can take its key from an environment variable
(OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, TOGETHER_API_KEY and
so on). When the key came from there, the Models & Keys card still showed the
provider as Connected and offered "Remove key…". Clicking it deleted nothing:
the variable still configured the provider, the card stayed Connected, and the
key field was filled again on the next page load.
Provider rows now carry key_source (store, env or none) and env_key, the name
of the variable when one is set. The card hides Remove key for a key that only
comes from the environment and shows a note naming the variable; when a key
saved in Settings sits on top of the variable, the note says that removing the
saved key falls back to it. remove_provider returns ok: false with the
variable's name when there is nothing stored to remove, and reports
configured: true when a saved key is removed but the variable remains. The
OpenAI-only environment note is replaced by this general one.
Tests: backend cases for the env-only, saved-over-env and plain stored key in
test_settings.py; a GUI test for the Remove key footer; locale parity with the
two new strings in en and zh.
GET /v1/system: processor, graphics, memory, storage, the largest model that runs well.
GET /v1/providers/ollama/models: size, tools, thinking, context and fit per model, read from Ollama instead of guessed; only tool-capable models join the picker.
With Ollama running and models pulled, the composer still showed "No model":
_ollama_models() returned nothing until the Ollama settings form was saved,
pulled models never reached the composer picker, saving Ollama only adopted
the recommended qwen3-coder:30b (nothing when it wasn't pulled), and an
ollama:* default always reported ready even with Ollama down.
- _ollama_models() falls back to localhost:11434 like _ollama_alive()
- get_settings() offers live pulled models while Ollama answers
- adopt_provider_default("ollama") falls back to the first pulled model
- model_ready uses model_selectable(), so an ollama:* default is ready only
while Ollama answers (identical for every other provider)
test_manager_curated_models pins _ollama_models alongside _ollama_alive so
it no longer reads the developer's real local Ollama.
Refs #582
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keyless is not configured — ollama:* picker entries render only while /api/tags answers (30s cached probe).
Stops phantom local models on machines without Ollama.
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.
Co-authored-by: Devika <devikaverma11@gmail.com>