Skip to content

[Bug]: onboard --auth-choice openai-codex does not set agents.defaults.model.primary #33290

@mwfj

Description

@mwfj

Summary

When running onboarding with --auth-choice openai-codex, OpenClaw registers the Codex OAuth auth profile but leaves agents.defaults.model.primary unchanged (often still Anthropic). This creates a silent intent mismatch: users believe Codex is active, but runtime still targets the old primary model.

Why this matters

  • During provider outages, users may think failover is broken while the system is actually still pinned to a different primary provider.
  • TUI status can show the old primary model unless users manually inspect config.
  • Recovery actions are delayed because behavior does not match onboarding intent.

Repro

  1. Run onboarding with Codex auth choice:
    openclaw onboard --auth-choice openai-codex
  2. Inspect config:
    openclaw config get agents.defaults.model.primary
  3. Observe primary remains unchanged from previous value.

Expected

If onboarding auth choice implies a default provider/model selection, set agents.defaults.model.primary accordingly (or prompt explicitly and require confirmation).

Actual

Auth profile is added, but primary model remains old value.

Related issues

Suggested fix

In onboarding flow, after successful provider auth setup:

  1. Determine provider-appropriate default model alias
  2. Set agents.defaults.model.primary (or ask for explicit opt-in)
  3. Print a clear summary of resulting primary + fallbacks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions