Skip to content

gut(session): remove resolveDefaultModel and simplify provider flow #2108

@alexey-pelykh

Description

@alexey-pelykh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    gutRemoving dead upstream subsystems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions