Summary
After the session key fix, fallback removal, and cost removal, resolveDefaultModel() and the provider/model variables in get-reply.ts and get-reply-run.ts serve no purpose. The only meaningful identifier is the runtime name from resolveAgentRuntimeOrThrow().
What to Remove/Simplify
- Delete
resolveDefaultModel() from directive-handling.persist.ts
- Remove
defaultProvider, defaultModel, aliasIndex from get-reply.ts
- Remove
provider, model params from RunPreparedReplyParams in get-reply-run.ts
- Replace all downstream uses with
runtimeId sourced from resolveAgentRuntimeOrThrow()
- Remove
parseModelRef() calls (no model references to parse)
- Remove channel model override logic (
resolveChannelModelOverride)
Acceptance Criteria
-
Given the codebase
When searching for resolveDefaultModel
Then no results found
-
Given get-reply.ts
When inspecting the provider/model flow
Then a single runtimeId flows from config to session usage
-
pnpm check passes
-
Existing tests pass (or updated)
Depends On
Summary
After the session key fix, fallback removal, and cost removal,
resolveDefaultModel()and theprovider/modelvariables inget-reply.tsandget-reply-run.tsserve no purpose. The only meaningful identifier is the runtime name fromresolveAgentRuntimeOrThrow().What to Remove/Simplify
resolveDefaultModel()fromdirective-handling.persist.tsdefaultProvider,defaultModel,aliasIndexfromget-reply.tsprovider,modelparams fromRunPreparedReplyParamsinget-reply-run.tsruntimeIdsourced fromresolveAgentRuntimeOrThrow()parseModelRef()calls (no model references to parse)resolveChannelModelOverride)Acceptance Criteria
Given the codebase
When searching for
resolveDefaultModelThen no results found
Given
get-reply.tsWhen inspecting the provider/model flow
Then a single
runtimeIdflows from config to session usagepnpm checkpassesExisting tests pass (or updated)
Depends On