Repository navigation
fix(pi-kilocode): let detectCompat auto-detect supportsDeveloperRole for kilocode models - #16
Merged
Merged
Conversation
Owner
|
It seems like there are various changes mixed in the current branch. Could you please check it? |
Contributor
Author
|
Sure thing :) sorry about that I had Pi working on my local install with a few features in and most likely did not respect "create a clean PR" instructions. Let's blame it on Antrophic :) |
…for kilocode models Remove the hardcoded supportsDeveloperRole: false override from toPiModel() so pi-ai's detectCompat() handles it automatically. kilo.ai is not in detectCompat's isNonStandard list, so the developer role is enabled, matching direct OpenRouter behaviour. Closes sudosubin#15
iRonin
force-pushed
the
fix/developer-role-compat
branch
from
April 11, 2026 14:23
6630deb to
90217e4
Compare
Contributor
Author
|
Thanks for catching that — you're right, the branch had gotten messy with merged-in changes from other PRs. I've force-pushed a clean branch from origin/main with only the single fix: removing the hardcoded The diff is now 2 files, 2 insertions, 2 deletions. All tests pass. |
sudosubin
reviewed
Apr 12, 2026
Owner
|
This PR was released in pi-kilocode@0.1.2 via commit 06c781b. Thank you again for the contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15
Problem
toPiModel()hardcodessupportsDeveloperRole: falsefor all kilocode models. This overrides pi-ai'sdetectCompat()auto-detection, which would returntruefor the Kilo gateway URL (not inisNonStandardlist).The result: kilocode sends the system prompt as
role: "system"for reasoning models, while direct OpenRouter sendsrole: "developer"for the same model. This causes observably different thinking/reasoning behaviour.Verification
The Kilo gateway accepts
role: "developer"— confirmed with a directcurltohttps://api.kilo.ai/api/openrouter/chat/completions: HTTP 200, valid response.Fix
Remove the
supportsDeveloperRole: falseoverride sodetectCompat()handles it automatically.supportsStore: falseandthinkingFormat: "openrouter"are kept as explicit overrides sincedetectCompatwould get both wrong for thekilo.aibaseUrl (storeunsupported;thinkingFormatwould default to"openai"not"openrouter").Tests
Updated existing test to assert
supportsDeveloperRole === undefined(not set bytoPiModel) with a comment explaining that the resolved value (true) is computed later by pi-ai'sgetCompat()which merges explicit compat withdetectCompat()output. 19/19 tests passing.