mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 23:47:54 +08:00
docs: use the current DeepSeek flash id in the samples
The default catalog and the sample config still named `deepseek-v4-flash`, which DeepSeek keeps only as a compatibility alias. Spell out the mapping Claude-* ids get server-side (`deepseek-v4-pro` / `deepseek-flash`) instead of the `deepseek-v4-*` glob the flash rename made stale.
This commit is contained in:
@@ -52,7 +52,7 @@ lmproto/deepseek/anthropic/ ← DeepSeek Anthropic client (extends Anthropic
|
|||||||
- **`openai/client.py`** — platform `OpenAIClient` (`kind="responses"`): chat completions + `responses` / `get_response` / `delete_response`.
|
- **`openai/client.py`** — platform `OpenAIClient` (`kind="responses"`): chat completions + `responses` / `get_response` / `delete_response`.
|
||||||
- **`anthropic/model.py`** — Anthropic Messages request/response + SSE event models.
|
- **`anthropic/model.py`** — Anthropic Messages request/response + SSE event models.
|
||||||
- **`anthropic/client.py`** — `AnthropicClient` (`kind="messages"`): `POST /messages` + `GET /models`.
|
- **`anthropic/client.py`** — `AnthropicClient` (`kind="messages"`): `POST /messages` + `GET /models`.
|
||||||
- **DeepSeek** — `DeepseekOpenAIClient` (`kind="chat_completions"`); models add `reasoning_content`, `prefix`, `ThinkingOptions`, and it injects the `thinking` flag (`enabled`, or `disabled` for `reasoning_effort = "none"`) after encoding. Config default model ids: `deepseek-v4-flash`, `deepseek-v4-pro`. `DeepseekResponsesClient` (`kind="responses"`) extends the OpenAI Responses client for `convention = "responses"` (SSE stops at terminal events — DeepSeek sends no `[DONE]`). `DeepseekAnthropicClient` (`kind="messages"`) extends `AnthropicClient` for `convention = "anthropic"` (base `https://api.deepseek.com/anthropic`; `models()` returns `[]`).
|
- **DeepSeek** — `DeepseekOpenAIClient` (`kind="chat_completions"`); models add `reasoning_content`, `prefix`, `ThinkingOptions`, and it injects the `thinking` flag (`enabled`, or `disabled` for `reasoning_effort = "none"`) after encoding. Config default model ids: `deepseek-flash`, `deepseek-v4-pro`. `DeepseekResponsesClient` (`kind="responses"`) extends the OpenAI Responses client for `convention = "responses"` (SSE stops at terminal events — DeepSeek sends no `[DONE]`). `DeepseekAnthropicClient` (`kind="messages"`) extends `AnthropicClient` for `convention = "anthropic"` (base `https://api.deepseek.com/anthropic`; `models()` returns `[]`).
|
||||||
|
|
||||||
### Config (`config/`)
|
### Config (`config/`)
|
||||||
|
|
||||||
|
|||||||
@@ -203,10 +203,10 @@ Supported provider presets today:
|
|||||||
|--------|------------------------|--------|
|
|--------|------------------------|--------|
|
||||||
| `openai` (default if `preset` omitted) | OpenAI **Responses** (`POST /responses`) | Default models `gpt-5.4` / `gpt-5.4-mini` / `gpt-5.4-nano` when `models` is omitted; optional `provider_tools` (default `web_search`) |
|
| `openai` (default if `preset` omitted) | OpenAI **Responses** (`POST /responses`) | Default models `gpt-5.4` / `gpt-5.4-mini` / `gpt-5.4-nano` when `models` is omitted; optional `provider_tools` (default `web_search`) |
|
||||||
| `openai-compatible` | Chat Completions | Generic hosts (vLLM, LiteLLM, proxies); requires `url` |
|
| `openai-compatible` | Chat Completions | Generic hosts (vLLM, LiteLLM, proxies); requires `url` |
|
||||||
| `deepseek` | Chat Completions (DeepSeek) | Default models `deepseek-v4-flash` / `deepseek-v4-pro` when `models` is omitted; set `convention = "responses"` (provider or per-model) to use the OpenAI **Responses** API (`POST /responses`, currently only `deepseek-v4-flash`), or `convention = "anthropic"` to use the Anthropic **Messages** API on `https://api.deepseek.com/anthropic` |
|
| `deepseek` | Chat Completions (DeepSeek) | Default models `deepseek-flash` / `deepseek-v4-pro` when `models` is omitted; set `convention = "responses"` (provider or per-model) to use the OpenAI **Responses** API (`POST /responses`, currently only `deepseek-flash`), or `convention = "anthropic"` to use the Anthropic **Messages** API on `https://api.deepseek.com/anthropic` |
|
||||||
| `anthropic` | Anthropic **Messages** (`POST /messages`) | Native tools/streaming; set `access_key_or_token` (API key) |
|
| `anthropic` | Anthropic **Messages** (`POST /messages`) | Native tools/streaming; set `access_key_or_token` (API key) |
|
||||||
|
|
||||||
Model-level `preset` / `url` overrides on a catalog entry can route a single provider name to a different API (e.g. gateway + Anthropic model). DeepSeek models may also carry a per-model `convention` (empty = inherit the provider-level one), e.g. serve `deepseek-v4-flash` over Responses while `deepseek-v4-pro` stays Chat Completions:
|
Model-level `preset` / `url` overrides on a catalog entry can route a single provider name to a different API (e.g. gateway + Anthropic model). DeepSeek models may also carry a per-model `convention` (empty = inherit the provider-level one), e.g. serve `deepseek-flash` over Responses while `deepseek-v4-pro` stays Chat Completions:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[providers.deepseek]
|
[providers.deepseek]
|
||||||
@@ -214,7 +214,7 @@ preset = "deepseek"
|
|||||||
access_key_or_token = "sk-..."
|
access_key_or_token = "sk-..."
|
||||||
|
|
||||||
[providers.deepseek.models]
|
[providers.deepseek.models]
|
||||||
"deepseek-v4-flash" = { text = true, convention = "responses" }
|
"deepseek-flash" = { text = true, convention = "responses" }
|
||||||
"deepseek-v4-pro" = { text = true }
|
"deepseek-v4-pro" = { text = true }
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -222,8 +222,8 @@ DeepSeek's Anthropic convention (`convention = "anthropic"`) points at
|
|||||||
`https://api.deepseek.com/anthropic` by default and is fully supported by the
|
`https://api.deepseek.com/anthropic` by default and is fully supported by the
|
||||||
agent's Anthropic Messages path (tools, streaming, usage). DeepSeek maps
|
agent's Anthropic Messages path (tools, streaming, usage). DeepSeek maps
|
||||||
`claude-opus*` model ids to `deepseek-v4-pro` and `claude-haiku*` /
|
`claude-opus*` model ids to `deepseek-v4-pro` and `claude-haiku*` /
|
||||||
`claude-sonnet*` (and unknown ids) to `deepseek-v4-flash` server-side; real
|
`claude-sonnet*` (and unknown ids) to `deepseek-flash` server-side; real
|
||||||
`deepseek-v4-*` ids pass through as-is. `GET /models` is not documented on that
|
DeepSeek ids pass through as-is. `GET /models` is not documented on that
|
||||||
base, so model selection is config-driven.
|
base, so model selection is config-driven.
|
||||||
|
|
||||||
If `[database]` is omitted (or SQLite `url` is unset/empty), chat uses a durable file under the user data dir (e.g. `~/.local/share/plyngent/chat.db` on Linux). Set `url = ":memory:"` for a true in-memory SQLite (CLI warns; no file; useful for tests).
|
If `[database]` is omitted (or SQLite `url` is unset/empty), chat uses a durable file under the user data dir (e.g. `~/.local/share/plyngent/chat.db` on Linux). Set `url = ":memory:"` for a true in-memory SQLite (CLI warns; no file; useful for tests).
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ access_key_or_token = "sk-replace-me"
|
|||||||
# "claude-opus-4-20250514" = { text = true, reasoning_effort = "xhigh" }
|
# "claude-opus-4-20250514" = { text = true, reasoning_effort = "xhigh" }
|
||||||
|
|
||||||
# --- DeepSeek (OpenAI-compatible / Responses / Anthropic conventions) ---
|
# --- DeepSeek (OpenAI-compatible / Responses / Anthropic conventions) ---
|
||||||
# Default models if [providers.*.models] is omitted: deepseek-v4-flash, deepseek-v4-pro.
|
# Default models if [providers.*.models] is omitted: deepseek-flash, deepseek-v4-pro.
|
||||||
# [providers.deepseek]
|
# [providers.deepseek]
|
||||||
# preset = "deepseek"
|
# preset = "deepseek"
|
||||||
# access_key_or_token = "sk-replace-me"
|
# access_key_or_token = "sk-replace-me"
|
||||||
@@ -180,10 +180,10 @@ access_key_or_token = "sk-replace-me"
|
|||||||
# # Convention selects the API surface:
|
# # Convention selects the API surface:
|
||||||
# # "" / "openai" → OpenAI-compatible chat completions (default)
|
# # "" / "openai" → OpenAI-compatible chat completions (default)
|
||||||
# # "responses" → OpenAI Responses API (POST /responses; today only
|
# # "responses" → OpenAI Responses API (POST /responses; today only
|
||||||
# # deepseek-v4-flash supports it)
|
# # deepseek-flash supports it)
|
||||||
# # "anthropic" → Anthropic Messages API (POST /messages on
|
# # "anthropic" → Anthropic Messages API (POST /messages on
|
||||||
# # https://api.deepseek.com/anthropic; claude-* model ids
|
# # https://api.deepseek.com/anthropic; claude-* model ids
|
||||||
# # map server-side to deepseek-v4-*)
|
# # map server-side to deepseek-v4-pro / deepseek-flash)
|
||||||
# convention = "responses"
|
# convention = "responses"
|
||||||
# # Legacy location (parsed but ignored; prefer the typed field above):
|
# # Legacy location (parsed but ignored; prefer the typed field above):
|
||||||
# # extras = { convention = "openai" }
|
# # extras = { convention = "openai" }
|
||||||
@@ -191,5 +191,5 @@ access_key_or_token = "sk-replace-me"
|
|||||||
# # reasoning_effort = "high"
|
# # reasoning_effort = "high"
|
||||||
#
|
#
|
||||||
# [providers.deepseek.models]
|
# [providers.deepseek.models]
|
||||||
# "deepseek-v4-flash" = { text = true, convention = "responses" }
|
# "deepseek-flash" = { text = true, convention = "responses" }
|
||||||
# "deepseek-v4-pro" = { text = true, reasoning_effort = "max" }
|
# "deepseek-v4-pro" = { text = true, reasoning_effort = "max" }
|
||||||
|
|||||||
Reference in New Issue
Block a user