docs: update all documentation to reflect apiKey refactoring (#528)
Update all documentation files that contained outdated apiKeyEnv references to use the new apiKey approach. ## Changes - docs/architecture.md: Update config example to use apiKey field - docs/wf-stateless-design.md: Update config examples and type definitions to use apiKey instead of apiKeyEnv - docs/builtin-agent-research.md: Update ProviderConfig type definition and code examples All documentation now consistent with the code implementation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -402,7 +402,7 @@ workflow 怎么配置和使用 model?
|
||||
```136:160:packages/workflow-protocol/src/types.ts
|
||||
export type ProviderConfig = {
|
||||
baseUrl: string;
|
||||
apiKeyEnv: string;
|
||||
apiKey: string;
|
||||
};
|
||||
|
||||
export type ModelConfig = {
|
||||
@@ -429,7 +429,7 @@ export type WorkflowConfig = {
|
||||
export function resolveModel(config: WorkflowConfig, alias: ModelAlias): ResolvedLlmProvider {
|
||||
const modelEntry = config.models[alias];
|
||||
const providerEntry = config.providers[modelEntry.provider];
|
||||
const apiKey = process.env[providerEntry.apiKeyEnv];
|
||||
const apiKey = providerEntry.apiKey;
|
||||
return { baseUrl: providerEntry.baseUrl, apiKey, model: modelEntry.name };
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user