fix: prefer env keys unless profiles configured
This commit is contained in:
@@ -40,7 +40,19 @@ describe("getApiKeyForModel", () => {
|
||||
api: "openai-codex-responses",
|
||||
} as Model<Api>;
|
||||
|
||||
const apiKey = await getApiKeyForModel({ model });
|
||||
const apiKey = await getApiKeyForModel({
|
||||
model,
|
||||
cfg: {
|
||||
auth: {
|
||||
profiles: {
|
||||
"openai-codex:default": {
|
||||
provider: "openai-codex",
|
||||
mode: "oauth",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(apiKey.apiKey).toBe(oauthFixture.access);
|
||||
|
||||
const authProfiles = await fs.readFile(
|
||||
|
||||
Reference in New Issue
Block a user