mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 02:22:55 +00:00
fix(agents): scope volcengine-plan/byteplus-plan auth lookup to profile resolution
The configure flow stores auth credentials under `provider: "volcengine"`, but the coding model uses `volcengine-plan` as its provider. Add a scoped `normalizeProviderIdForAuth` function used only by `listProfilesForProvider` so coding-plan variants resolve to their base provider for auth credential lookup without affecting global provider routing. Closes #31731 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
a71b8d23be
commit
aab87ec880
@@ -8,6 +8,7 @@ import {
|
||||
buildModelAliasIndex,
|
||||
normalizeModelSelection,
|
||||
normalizeProviderId,
|
||||
normalizeProviderIdForAuth,
|
||||
modelKey,
|
||||
resolveAllowedModelRef,
|
||||
resolveConfiguredModelRef,
|
||||
@@ -64,6 +65,14 @@ describe("model-selection", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("normalizeProviderIdForAuth", () => {
|
||||
it("maps coding-plan variants to base provider for auth lookup", () => {
|
||||
expect(normalizeProviderIdForAuth("volcengine-plan")).toBe("volcengine");
|
||||
expect(normalizeProviderIdForAuth("byteplus-plan")).toBe("byteplus");
|
||||
expect(normalizeProviderIdForAuth("openai")).toBe("openai");
|
||||
});
|
||||
});
|
||||
|
||||
describe("parseModelRef", () => {
|
||||
it("should parse full model refs", () => {
|
||||
expect(parseModelRef("anthropic/claude-3-5-sonnet", "openai")).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user