fix(provider): detect configured Cerebras endpoints#3
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Status refresh (2026-05-22): the branch is still current against Verified in a fresh scratch checkout of this PR:
I also checked the broad root typecheck failure against plain
So the PR-specific provider/transform coverage is passing; the red broad/cancelled checks do not appear caused by the endpoint-detection diff. |
Issue for this PR
Follow-up to #2. Custom OpenAI-compatible provider configs can point at Cerebras through
options.baseURLwithout declaring a provider/modelapiURL, which means the Cerebras reasoning replay normalizer cannot reliably identify the resolved endpoint.Type of change
What does this PR do?
This PR makes configured custom endpoints visible to provider transforms and tightens Cerebras endpoint detection:
endpointorbaseURLintomodel.api.urlwhen no model/providerapifield is declaredThis lets a user configure an OpenAI-compatible provider with
baseURL: "https://api.cerebras.ai/v1"and still get the same reasoning replay cleanup as the dedicated@ai-sdk/cerebrasprovider.How did you verify your code works?
bunx prettier --write src/provider/provider.tsbun test --timeout 30000 test/provider/provider.test.ts test/provider/transform.test.ts-> 331 passed, 0 failedbun run typecheckwas checked; it still reports two current-dev baseline errors unrelated to this patch:src/provider/transform.ts(19,38)missingOPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAXflag typingtest/acp/event-subscription.test.ts(11,30)missing../../src/project/with-instanceScreenshots / recordings
Not a UI change.
Checklist