Skip to content

Turn failures don't name the provider and model that failed, and provider origin is not exposed to clients #4328

Open

Description

@code-yeongyu

Summary

A request can be routed to a provider the user didn't pick and can't delete in the app, e.g. a custom provider defined in a models.json or an extension (sisyphuslabs/omo-desktop-app#4711). The failure says "The provider rejected the credentials. Action: re-authenticate the provider." and names neither provider nor model (packages/coding-agent/src/core/provider-failure.ts:13-22,76-78). The structured failure carries no model and describes only the last fallback rung. Clients get no file path or owning extension for a provider (modes/rpc/rpc-session-state-types.ts:22-49, rpc-read-response-types.ts:47-51, core/model-runtime.ts:1467-1484), so the app can't say where an entry comes from.

Expected

  • The turn failure (agent_end.failure and RPC payloads) carries the provider id and model actually used for the failing request, plus the provider the user selected when they differ.
  • Provider listings expose the origin (models.json path / env var name / extension id) as machine-readable fields.
  • TUI text names provider and model.

Related

sisyphuslabs/omo-desktop-app#4711, #4084, #2491.

Part of sisyphuslabs/omo-desktop-app#4713 (error-guidance audit; bases desktop 5d85e0d8bb, oh-my-openagent 7c0fed935c, senpi a854e7a, omo-service b709624). Tests pin only machine-consumed values (enum/code -> state mapping), never prose.

Activity

  1. code-yeongyu commented on Oct 26, 2026

    @code-yeongyu
    OwnerAuthor

    Draft PR #4334 at 8e37b17.

    • agent_end.failure now carries model plus selectedProvider/selectedModel when a fallback rung or routed model ran the failing request.
    • get_auth_providers rows carry origin: { kind: builtin | models_json | extension, modelsJsonPath?, extensionPath? }. Env-var keys stay status.source: "environment", and status.label already names the variable.
    • The TUI failure line names <model> on <provider>, plus the selected one when it differs.

    RED at base a854e7a: the new tests fail (8 failed / 18 passed). At the head: bun run check exit 0, changelog gate exit 0, 9 affected test files 139/139 passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions