This repository was archived by the owner on Aug 25, 2026. It is now read-only.
fix(media): degrade tool registration when the bound alias is stale - #65
Merged
Merged
Conversation
Ported from upstream kimi-code a7dc1ea (MoonshotAI#2985). Media tool registration re-resolves the profile's model alias on every refresh, but that alias comes from persisted state which resume replays without validating against the catalog. An alias whose config.toml entry has since been removed -- logout being the ordinary way -- made getRequester throw out of an event listener, surfacing to the user as an `[unexpected]` error. Degrade to "no model" instead: registration proceeds from the profile-reported capabilities without a model-bound video uploader, and recovers on its own once the alias resolves again. The upstream patch is applied by hand rather than cherry-picked, because upstream's copy of this file sits on a refactored module layout (`#/app/scopes`, `#/state/state`, `Service`) this fork does not share.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Ports upstream kimi-code
a7dc1ea28(MoonshotAI#2985).Media tool registration re-resolves the profile's model alias on every refresh, but that alias comes from persisted state that resume replays without validating it against the catalog. An alias whose
config.tomlentry was since removed — logout being the ordinary way — madegetRequesterthrow out of an event listener, which surfaces to the user as an[unexpected]error.It now degrades to "no model": registration proceeds from the profile-reported capabilities without a model-bound video uploader, and recovers on its own once the alias resolves again.
Applied by hand rather than cherry-picked — upstream's copy of this file sits on a refactored module layout (
#/app/scopes,#/state/state,Service) this fork doesn't share. Upstream's test came across too.Tested: the ported test was verified to fail without the fix and pass with it. agent-core-v2 4367 passed, typecheck and lint clean.