Skip to content

Management auth file upload does not propagate priority to runtime auth #2924

@xj999

Description

@xj999

Summary

When updating an OAuth auth file through the management upload flow, the top-level priority field is written to the JSON file, but it is not consistently propagated to the runtime auth Attributes["priority"].

As a result, scheduler selection can still treat the uploaded auth as priority 0, even though the file already contains a higher priority value.

Affected flow

Management auth file upload / rewrite flow:

  • POST /v0/management/auth-files

Expected behavior

If an uploaded auth file contains:

{
  "type": "codex",
  "email": "user@example.com",
  "priority": 98
}

then the runtime auth used by the scheduler should also have:

  • Metadata["priority"] = 98
  • Attributes["priority"] = "98"

so scheduler priority selection matches the file content.

Actual behavior

The JSON file is updated correctly, but runtime auth can miss Attributes["priority"], so selection still behaves as if priority is 0.

Reproduction

  1. Create or upload an OAuth auth file with top-level "priority": 98
  2. Keep another credential available with lower configured priority, for example priority: 9
  3. Send requests to a model both credentials support
  4. Observe that the lower-priority credential is still selected

Root cause

The management upload/rebuild path does not use the same file-to-auth synthesis logic as the watcher file-loading path, so auth-file-derived runtime fields like priority are not consistently translated into runtime auth attributes.

Fix

PR: #2923

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions