Fix OpenRouter Kimi K2.6 developer role

closes #5159
This commit is contained in:
Mario Zechner
2026-05-29 23:41:14 +02:00
Unverified
parent 778f519b23
commit a213abb97e
3 changed files with 12 additions and 0 deletions
+7
View File
@@ -5,9 +5,16 @@
### Breaking Changes
- Changed direct provider stream functions to require explicit `options.apiKey`; top-level `stream*`/`complete*` helpers still resolve built-in environment auth.
- Changed top-level stream helpers to delegate to `defaultModels()`, so setup failures are reported through stream error results consistently.
- Moved the built-in API provider registration helpers from the `providers/register-builtins` subpath to `api-registry`/the root export.
### Added
- Added `Models`/`MutableModels`, `builtinModels()`, and `defaultModels()` for isolated or process-default model metadata, stream, and auth resolution.
### Fixed
- Fixed OpenRouter Moonshot Kimi K2.6 requests to use `system` instead of unsupported `developer` messages ([#5159](https://github.com/earendil-works/pi/issues/5159)).
- Fixed OpenCode Go Kimi K2.6 thinking requests to send `thinking` objects instead of invalid string values, and fixed OpenCode Zen Grok Build thinking requests to omit unsupported `reasoning_effort` ([#5169](https://github.com/earendil-works/pi/issues/5169)).
## [0.77.0] - 2026-05-28
+3
View File
@@ -1235,6 +1235,9 @@ async function generateModels() {
candidate.cost.cacheRead = 0.07;
candidate.maxTokens = 4096;
}
if (candidate.provider === "openrouter" && candidate.id.startsWith("moonshotai/kimi-k2.6")) {
candidate.compat = { ...candidate.compat, supportsDeveloperRole: false };
}
if (candidate.provider === "openrouter" && candidate.id === "z-ai/glm-5") {
candidate.cost.input = 0.6;
candidate.cost.output = 1.9;
+2
View File
@@ -9947,6 +9947,7 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {
@@ -9964,6 +9965,7 @@ export const MODELS = {
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
compat: {"supportsDeveloperRole":false},
reasoning: true,
input: ["text", "image"],
cost: {