Skip to content

Commit f0e08ab

Browse files
jhao0413claude
andauthored
fix(provider): iflow provider should use merged provider config (#751)
Fix a bug where iflow provider's createModel function was using the static iflowProvider object instead of the merged _provider parameter. This prevented the provider from reading apiKey from config file (provider.iflow.options.apiKey), causing requests to be sent without x-iflow-signature header when IFLOW_API_KEY env var was not set. Changes: - Use _provider instead of iflowProvider in getProviderApiKey call - Use _provider instead of iflowProvider in createModelCreator call This ensures the provider respects user configuration and properly generates authentication signatures for all API requests. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 6c7bff6 commit f0e08ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/provider/providers/iflow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const iflowProvider: Provider = {
3838
'kimi-k2.5': {},
3939
},
4040
createModel(name, _provider, options) {
41-
const apiKey = getProviderApiKey(iflowProvider);
41+
const apiKey = getProviderApiKey(_provider);
4242
const baseFetch = options.customFetch ?? fetch;
4343
const customFetch = (async (url: RequestInfo | URL, init?: RequestInit) => {
4444
const headers = new Headers(init?.headers);
@@ -61,7 +61,7 @@ export const iflowProvider: Provider = {
6161
headers: Object.fromEntries(headers.entries()),
6262
});
6363
}) as typeof fetch;
64-
return createModelCreator(name, iflowProvider, {
64+
return createModelCreator(name, _provider, {
6565
...options,
6666
customFetch,
6767
});

0 commit comments

Comments
 (0)