@dreb/coding-agent 2.43.0 → 2.43.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/docs/custom-provider.md +1 -1
- package/docs/models.md +8 -1
- package/docs/providers.md +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,6 +129,8 @@ See [docs/providers.md](docs/providers.md) for detailed setup instructions, incl
|
|
|
129
129
|
|
|
130
130
|
**Custom providers & models:** Add providers via `~/.dreb/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md).
|
|
131
131
|
|
|
132
|
+
**Reasoning across model switches:** Exact-model signed, encrypted, or redacted reasoning state is replayed unchanged. Structured reasoning is portable only between models that share a provider and the `openai-completions` API when the destination accepts the source's recognized plain field (`reasoning_content`, `reasoning`, or `reasoning_text`). Other readable reasoning is retained as labelled plaintext in `<reformatted-pre-switch-reasoning>` markers with incompatible protocol metadata removed; opaque redacted or encrypted-only state is omitted for incompatible targets. This outbound conversion does not change session history, so switching back can replay the original state unless it was compacted or pruned. Custom models must also share provider identity and compatible API/signature behavior.
|
|
133
|
+
|
|
132
134
|
---
|
|
133
135
|
|
|
134
136
|
## Interactive Mode
|
package/docs/custom-provider.md
CHANGED
|
@@ -608,7 +608,7 @@ interface ProviderModelConfig {
|
|
|
608
608
|
requiresToolResultName?: boolean;
|
|
609
609
|
requiresAssistantAfterToolResult?: boolean;
|
|
610
610
|
requiresThinkingAsText?: boolean;
|
|
611
|
-
thinkingFormat?: "openai" | "openrouter" | "zai" | "qwen" | "qwen-chat-template";
|
|
611
|
+
thinkingFormat?: "openai" | "openrouter" | "zai" | "qwen" | "qwen-chat-template" | "kimi";
|
|
612
612
|
openRouterRouting?: OpenRouterRouting;
|
|
613
613
|
vercelGatewayRouting?: VercelGatewayRouting;
|
|
614
614
|
supportsStrictMode?: boolean;
|
package/docs/models.md
CHANGED
|
@@ -11,6 +11,7 @@ Add custom providers and models (Ollama, vLLM, LM Studio, proxies) via `~/.dreb/
|
|
|
11
11
|
- [Model Configuration](#model-configuration)
|
|
12
12
|
- [Overriding Built-in Providers](#overriding-built-in-providers)
|
|
13
13
|
- [Per-model Overrides](#per-model-overrides)
|
|
14
|
+
- [Reasoning Across Model Switches](#reasoning-across-model-switches)
|
|
14
15
|
- [OpenAI Compatibility](#openai-compatibility)
|
|
15
16
|
|
|
16
17
|
## Minimal Example
|
|
@@ -236,6 +237,12 @@ Behavior notes:
|
|
|
236
237
|
- You can combine provider-level `baseUrl`/`headers` with `modelOverrides`.
|
|
237
238
|
- If `models` is also defined for a provider, custom models are merged after built-in overrides. A custom model with the same `id` replaces the overridden built-in model entry.
|
|
238
239
|
|
|
240
|
+
## Reasoning Across Model Switches
|
|
241
|
+
|
|
242
|
+
A custom model's `provider` identity is part of reasoning-state compatibility; matching endpoint URLs or model IDs alone is not enough. Exact-model signed, encrypted, or redacted reasoning state is replayed unchanged. Between different models, structured reasoning is preserved only when both models use the same provider and `openai-completions` API, the destination accepts structured reasoning, and the source uses a recognized plain field: `reasoning_content`, `reasoning`, or `reasoning_text`.
|
|
243
|
+
|
|
244
|
+
For other targets, readable reasoning is retained as labelled plaintext inside `<reformatted-pre-switch-reasoning>` markers after incompatible protocol metadata is stripped. Redacted or encrypted-only opaque state is omitted. This conversion happens only for the outbound request and does not alter session history, so returning to the original model can replay its original state unless history has been compacted or pruned. Portability also depends on compatible provider signatures.
|
|
245
|
+
|
|
239
246
|
## OpenAI Compatibility
|
|
240
247
|
|
|
241
248
|
For providers with partial OpenAI compatibility, use the `compat` field.
|
|
@@ -270,7 +277,7 @@ For providers with partial OpenAI compatibility, use the `compat` field.
|
|
|
270
277
|
| `requiresToolResultName` | Include `name` on tool result messages |
|
|
271
278
|
| `requiresAssistantAfterToolResult` | Insert an assistant message before a user message after tool results |
|
|
272
279
|
| `requiresThinkingAsText` | Convert thinking blocks to plain text |
|
|
273
|
-
| `thinkingFormat` | Use `reasoning_effort`, `zai`, `qwen`,
|
|
280
|
+
| `thinkingFormat` | Use `reasoning_effort`, `reasoning: { effort }`, `zai`, `qwen`, `qwen-chat-template`, or nested `thinking: { type, effort? }` parameters |
|
|
274
281
|
| `supportsStrictMode` | Include the `strict` field in tool definitions |
|
|
275
282
|
| `openRouterRouting` | OpenRouter routing config passed to OpenRouter for model/provider selection |
|
|
276
283
|
| `vercelGatewayRouting` | Vercel AI Gateway routing config for provider selection (`only`, `order`) |
|
package/docs/providers.md
CHANGED
|
@@ -51,8 +51,10 @@ Use `/logout` to clear credentials. Tokens are stored in `~/.dreb/agent/auth.jso
|
|
|
51
51
|
|
|
52
52
|
- `/login` uses the Kimi Code OAuth subscription endpoint at `https://api.kimi.com/coding/v1`.
|
|
53
53
|
- `KIMI_API_KEY` uses Kimi For Coding's Anthropic-compatible API at `https://api.kimi.com/coding`.
|
|
54
|
-
-
|
|
55
|
-
-
|
|
54
|
+
- Built-in OAuth models are `kimi-for-coding` (default, 262k context), `k3` (1M context), and `kimi-for-coding-highspeed` (262k context). Model availability is plan-dependent: the `k3` 1M-context ID and the `kimi-for-coding-highspeed` ID are only exposed when the subscription includes them, and `kimi-for-coding-highspeed` runs at roughly 6× speed for 3× quota usage. On login/refresh, dreb asks the Kimi API which models the subscription is entitled to and updates context, reasoning, image, tool-use, protocol, and thinking-effort metadata. Compatible newly discovered IDs are templated conservatively; if discovery fails, the static list remains available.
|
|
55
|
+
- OAuth requests use the current Kimi Code device identity contract and share its stable `~/.kimi-code/device_id`. Extra low-precedence headers can be supplied with newline-separated `KIMI_CODE_CUSTOM_HEADERS` values.
|
|
56
|
+
- The OAuth coding endpoint accepts OpenAI-style multimodal content arrays with base64 `image_url` data URLs. dreb keeps a conservative 32k output-token cap because the managed model catalog does not currently advertise a per-model output limit.
|
|
57
|
+
- Moonshot Open Platform uses a different base URL (`https://api.moonshot.ai/v1`); don't assume both routes expose identical behavior.
|
|
56
58
|
|
|
57
59
|
## API Keys
|
|
58
60
|
|