Skip to content

fix(provider): preserve @cf model identifiers#1701

Open
Alix-007 wants to merge 1 commit intosipeed:mainfrom
Alix-007:fix/issue-1165-atcf-model-id-cleanbase
Open

fix(provider): preserve @cf model identifiers#1701
Alix-007 wants to merge 1 commit intosipeed:mainfrom
Alix-007:fix/issue-1165-atcf-model-id-cleanbase

Conversation

@Alix-007
Copy link
Copy Markdown
Contributor

Description

Cloudflare AI model IDs such as @cf/qwen/qwen1.5-0.5b-chat contain slashes that belong to the model path. PicoClaw was treating the first slash as a provider separator, which broke both provider creation and model-reference parsing.

This change treats @... model IDs as bare model identifiers, preserving the full string while still using the default OpenAI-compatible provider path.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor

AI Code Generation

  • Fully AI-generated
  • Mostly AI-generated
  • Mostly Human-written

Related Issue

Fixes #1165

Technical Context

  • keep @cf/... intact in ExtractProtocol
  • keep @cf/... intact in ParseModelRef
  • add regression tests for provider creation and model ref parsing

Test Environment

  • Hardware: PC
  • OS: Linux
  • Model/Provider: N/A
  • Channels: N/A

Evidence

  • go test ./pkg/providers

Checklist

  • I reviewed the change.
  • I added regression tests.

@sipeed-bot sipeed-bot bot added type: bug Something isn't working domain: provider go Pull requests that update go code labels Mar 17, 2026
@Alix-007
Copy link
Copy Markdown
Contributor Author

Retained PR is still green: Security Check / Linter / Tests / license/cla all passed on the head. Ready for maintainer review when there is capacity to reconcile the provider fallback ID regression.

@Alix-007
Copy link
Copy Markdown
Contributor Author

Retained PR is still green: Security Check / Linter / Tests / license/cla all passed on the fix/issue-1165-atcf-model-id-cleanbase head. Ready for maintainer review when there is capacity to reconcile the provider fallback ID regression.

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

Labels

domain: provider go Pull requests that update go code type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Model name is not taken

1 participant