You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This removes the remaining extra provider work from new-agent draft metadata lookups.
Draft feature and command listing now use only the model explicitly present in the draft config. If the UI has not resolved a model yet, the daemon returns no draft metadata instead of discovering a default model through provider catalog loading. Pi also reports an empty draft feature list directly, so Paseo does not start a throwaway Pi session just to learn there are no feature controls.
How did you verify it
npm run format
npm run lint
npm run typecheck
Pre-commit hooks ran format checks, targeted lint, and npm run typecheck
npx vitest run packages/server/src/server/agent/agent-manager.test.ts packages/server/src/server/agent/providers/pi/agent.test.ts --bail=1
The new tests cover the important behavior: draft features and commands with no model do not fetch the provider catalog, check availability, or create a scratch session; explicit-model draft metadata still works without default-model fetching; Pi draft features return [] without starting a Pi runtime session.
Checklist
One focused change. Unrelated cleanups split out.
npm run typecheck passes
npm run lint passes
npm run format ran (Biome)
UI changes include screenshots or video for every affected platform (N/A - no UI changes)
This PR eliminates unnecessary provider catalog fetches and session creation from the draft metadata paths (listDraftCommands, listDraftFeatures). When no model is present in the draft config, both methods now return an empty array immediately rather than triggering default-model resolution through fetchCatalog. Pi's listFeatures now returns [] directly, removing the previously implicit Pi session creation just to report no feature controls.
normalizeConfig gains a resolveDefaultModel option (defaults to true for backward compatibility), and its default-model resolution logic is extracted into resolveDefaultModelId.
Both listDraftCommands and listDraftFeatures call normalizeConfig({ resolveDefaultModel: false }) and return [] before the availability check when no model is present.
PiRpcAgentClient.listFeatures is added, returning [] so AgentManager dispatches through client.listFeatures rather than falling through to createSession.
Confidence Score: 5/5
Safe to merge — targeted optimization with no changes to the normal agent startup flow.
All call sites of normalizeConfig that need default-model resolution keep the default behavior. The draft-listing methods return early when no model is present. Pi's listFeatures correctly short-circuits session creation. The new tests cover both the no-model and explicit-model branches with specific assertions.
No files require special attention.
Important Files Changed
Filename
Overview
packages/server/src/server/agent/agent-manager.ts
Adds NormalizeConfigOptions, extracts resolveDefaultModelId, and gates catalog/session work in both draft-listing methods behind resolveDefaultModel: false + early no-model return.
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
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.
Linked issue
Closes #1541
Type of change
What does this PR do
This removes the remaining extra provider work from new-agent draft metadata lookups.
Draft feature and command listing now use only the model explicitly present in the draft config. If the UI has not resolved a model yet, the daemon returns no draft metadata instead of discovering a default model through provider catalog loading. Pi also reports an empty draft feature list directly, so Paseo does not start a throwaway Pi session just to learn there are no feature controls.
How did you verify it
npm run formatnpm run lintnpm run typechecknpm run typechecknpx vitest run packages/server/src/server/agent/agent-manager.test.ts packages/server/src/server/agent/providers/pi/agent.test.ts --bail=1The new tests cover the important behavior: draft features and commands with no model do not fetch the provider catalog, check availability, or create a scratch session; explicit-model draft metadata still works without default-model fetching; Pi draft features return
[]without starting a Pi runtime session.Checklist
npm run typecheckpassesnpm run lintpassesnpm run formatran (Biome)