Skip to content

Hardcoded Claude model references prevent using alternative providers #2432

@Wells-Li

Description

@Wells-Li

Problem Description

When using oh-my-opencode with alternative AI providers (e.g., ali-coding-plan), the system fails because of hardcoded Claude model references in the category prompt constants.

Error Encountered

Error: Could not load the default credentials.
Browse to https://cloud.google.com/docs/authentication/getting-started

Root Cause

File: dist/tools/delegate-task/constants.d.ts

The following constants contain hardcoded Claude model names:

  1. QUICK_CATEGORY_PROMPT_APPEND - references claude-haiku-4-5
  2. UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND - references claude-sonnet-4-6

These hardcoded references cause the system to attempt loading Claude models even when the user has configured a different provider in opencode.jsonc.

Current Workaround

Users must manually edit the cached file:

sed -i 's/claude-haiku-4-5/your-provider\/your-model/g' ~/.bun/install/cache/oh-my-opencode@VERSION/dist/tools/delegate-task/constants.d.ts

This workaround is fragile and gets overwritten on package updates.

Suggested Fix

  1. Remove hardcoded model references from the prompt text
  2. Or, read model names from the configuration system
  3. Or, make model names configurable per category

Environment

  • oh-my-opencode: v3.11.2
  • Platform: Windows 11

Impact

This issue prevents users who cannot access Claude API from using quick and unspecified-low categories.

Thanks!

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