fix: make quick start provider neutral

Maintainer edit: restart the Quick Start flow around an API-key-first path without recommending OpenRouter or DeepSeek. Detect unique key prefixes locally, fall back to a user-provided base URL, and only fetch models from that approved URL.
This commit is contained in:
chengyongru
2026-06-22 13:04:05 +08:00
committed by Xubin Ren
parent ed3a8f64d8
commit 2319b660e6
5 changed files with 213 additions and 71 deletions
+11 -9
View File
@@ -9,7 +9,7 @@ If you have never used a terminal or edited a config file before, use [`start-wi
You need:
- Python 3.11 or newer.
- One LLM provider, company endpoint, subscription endpoint, or local model server you can call. The examples below use DeepSeek only so the snippets are concrete and the compact path does not depend on OpenRouter; any supported provider works when the key, provider name, and model ID match.
- One LLM provider, company endpoint, subscription endpoint, or local model server you can call. The examples below use a generic OpenAI-compatible `custom` provider so the compact path does not recommend one hosted service; any supported provider works when the key, provider name, and model ID match.
- Git only if you install from source.
- Node.js or Bun only if you are developing the WebUI itself.
@@ -128,8 +128,9 @@ Open `~/.nanobot/config.json`. Add or merge these blocks into the file created b
```json
{
"providers": {
"deepseek": {
"apiKey": "your-deepseek-api-key"
"custom": {
"apiKey": "your-api-key",
"apiBase": "https://api.example.com/v1"
}
}
}
@@ -142,8 +143,8 @@ Open `~/.nanobot/config.json`. Add or merge these blocks into the file created b
"modelPresets": {
"primary": {
"label": "Primary",
"provider": "deepseek",
"model": "deepseek-v4-flash",
"provider": "custom",
"model": "model-id-from-your-provider",
"maxTokens": 8192,
"contextWindowTokens": 65536,
"temperature": 0.1
@@ -161,7 +162,7 @@ The provider and model inside a preset must match. The snippet above is only an
| Replace | Where |
|---|---|
| Provider config key, such as `deepseek` | `providers.<provider>` |
| Provider config key, such as `custom` | `providers.<provider>` |
| API key or environment variable | `providers.<provider>.apiKey` |
| Preset provider name | `modelPresets.primary.provider` |
| Model ID | `modelPresets.primary.model` |
@@ -207,8 +208,9 @@ If you prefer not to store secrets in `config.json`, reference an environment va
```json
{
"providers": {
"deepseek": {
"apiKey": "${DEEPSEEK_API_KEY}"
"custom": {
"apiKey": "${PROVIDER_API_KEY}",
"apiBase": "https://api.example.com/v1"
}
}
}
@@ -260,7 +262,7 @@ Example prompt:
```text
Read docs/quick-start.md, docs/providers.md, and docs/configuration.md in this checkout.
Then update ~/.nanobot/config.json to add a DeepSeek model preset named "primary".
Then update ~/.nanobot/config.json to add a model preset named "primary" for my provider.
Tell me exactly what changed and whether I need to run /restart.
```