refactor(cli): carry agent displayName/source as typed fields instead of provider options#11773
Merged
Merged
Conversation
… of provider options Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
…metadata-fields Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (6 files)
Previous Review SummaryCurrent summary above is authoritative. Previous snapshots are kept for context only. Previous reviewStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Fix these issues in Kilo Cloud Files Reviewed (7 files)
Reviewed by gpt-5.4-20260305 · Input: 87K · Output: 10.3K · Cached: 586.8K Review guidance: REVIEW.md from base branch |
markijbema
approved these changes
Jun 29, 2026
vkeerthivikram
pushed a commit
to vkeerthivikram/kilocode
that referenced
this pull request
Jun 30, 2026
…metadata-fields refactor(cli): carry agent displayName/source as typed fields instead of provider options
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.
Summary
Follow-up hardening split out of #11767. Keeps the agent
optionsrecord provider-clean by storing Kilo agent metadata as typed fields instead of mixing it into the bag that is forwarded to the model API.optionsis forwarded verbatim intoproviderOptions, so any non-provider key in it gets sent in the request body. PreviouslyconvertOrganizationModeand marketplace/.mdagents storeddisplayName/sourcethere, which leaked to strict providers (the root cause behind #11754).Changes
displayName/sourcefields to the agent config schema (config/agent.ts, also inKNOWN_KEYSso they're not promoted intooptions) and the runtimeAgent.Info(agent/agent.ts).convertOrganizationModenow writes typeddisplayName/sourceinstead ofoptions: { ... }.processConfigItemlifts any legacy/marketplaceoptions.displayName/options.sourceonto the typed fields and deletes them fromoptions, so installed.md/marketplace agents are cleaned at construction too.source(with anoptionsfallback for safety).Relationship to #11767
#11767 is the actual bug fix for #11754 — it strips
id/displayName/sourcefromagent.optionsat the request boundary as a safety net (and is the only thing that coversid, which intentionally stays inoptions). This PR is independent defense-in-depth that removes the pollution at its source; the two can merge in either order.Notes
displayName,source) to the agent config schema. If the cloud config JSON schema isn't auto-derived fromConfig.Info, a matching entry may need mirroring in the cloud repo (apps/web/src/app/config.json/extras.ts).bun test/ typecheck could not be run in this environment (missing@opentui/solidpreload and a broken@babel/traversein the dep cache). Tests:test/kilocode/agent-config-metadata.test.ts(processConfigItem) and aconvertOrganizationModecase intest/kilocode/modes-migrator.test.ts.