Repository navigation
Version Packages - #38
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@pwrdrvr/agent-acp@0.16.0
Minor Changes
a91fb4f: Fix ACP model selection, which threw before the request ever left the process, and route it through the config option when that is how the agent advertises model choice.
The bug. Every ACP model selection failed with
conn.setSessionModel is not a function. ACP 1.3 has nosession/set_model: it is absent from the SDK'sAGENT_METHODS, andClientSideConnectionexposes nosetSessionModel. ButAcpAgentConnectionstill declared one, andcreateConnectionattaches the realClientSideConnectionwith anas unknown ascast that erases the structural check — so the dead name type-checked and threw at runtime, for every agent, on everystartThread({ model }).AcpAgentClient.startThreadcatches and debug-logs it, so the only symptom was a session quietly running on the agent's default model.The declaration and its dispatch case are gone.
session/set_modelnow ridesdispatch's default arm, which sends it verbatim through the SDK's genericrequest()— agents that still accept it as a vendor extension keep working.The routing.
setModelnow picks its route from the advertised capabilities:session/set_config_optionagainst themodeloption (category: "model", or a literalmodelid) when the agent publishes nomodels.availableModels, andsession/set_modelwhen it does. This is the write twin of a distinction the read path has always made —modelIdFromCapabilitiesandmodelsFromCapabilitiesboth fall back to the config option — and the two disagreeing is what let a host list models it could not then select.Preferring the config option is not only spec-correctness. Its reply carries the agent's full refreshed config set, so a capability-dependent step that runs straight afterwards sees the new state;
session/set_modelanswers{}and refreshes only via an asyncconfig_option_updatenotification. That matters on Kimi, where the model DETERMINES which thought levels exist —K2.7 Codingoffers onlyon,K3offerslow/high/max.applyReasoningpicks fromruntimeCapabilitieson the followingstartTurn, so the refresh the model write leaves behind is what it reads.Measured against Kimi Code CLI 0.29.2, whose
session/newreturns amodelconfig option and nomodelscapability at all:session/set_config_option {configId: "model"}is accepted and echoes the newcurrentValue. Kimi does also still honoursession/set_model, so for that agent the first half of this change alone restores the behaviour; the routing is what keeps it working on an agent that implements only what ACP 1.3 defines.A model write routed through a config option records both
currentModelIdandconfigValues[id]in the session's runtime state, so a consumer readingthread_settings.modelneed not know which route the agent exposed.Type changes:
AcpRuntimeOptionSourcegains"modelConfigOption";AcpAgentConnectiondropssetSessionModel.