Skip to content

Commit 09ff7bf

Browse files
TonyCaseyclaude
andauthored
fix(hook): pass LLM config from .git-mem.yaml to DI container (GIT-122) (#83)
The hook command loaded .git-mem.yaml but never forwarded the llm config to createContainer(), so provider selection always fell back to env-var auto-detection. With both ANTHROPIC_API_KEY and OPENAI_API_KEY present, Anthropic was always chosen, causing enrichment to time out at 8s on slower responses. AI-Agent: Claude-Code/2.1.42 AI-Model: claude-opus-4-6 AI-Gotcha: The hook command must explicitly pass LLM configuration from .git-mem.yaml to the DI container, otherwise provider selection falls back to environment variable auto-detection. AI-Confidence: verified AI-Tags: hook, dependency-injection, llm-config, git-mem-yaml, anthropic, openai, environment-variables, provider-selection, timeout, enrichment, performance, create-container AI-Lifecycle: project AI-Memory-Id: 1026229e AI-Source: llm-enrichment Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4da8a83 commit 09ff7bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/commands/hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export async function hookCommand(eventName: string, _logger?: ILogger): Promise
161161
return;
162162
}
163163

164-
const container = createContainer({ scope: `hook:${eventName}` });
164+
const container = createContainer({ scope: `hook:${eventName}`, llm: config.llm });
165165
const { eventBus } = container.cradle;
166166

167167
const event = buildEvent(eventType, normalizedInput);

0 commit comments

Comments
 (0)