Conversation
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. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> 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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughAdds the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes hook execution to respect the .git-mem.yaml llm: configuration by forwarding config.llm into the DI container, ensuring LLM provider/model selection doesn’t incorrectly fall back to env-var auto-detection during hooks.
Changes:
- Pass
llm: config.llmintocreateContainer()fromhook.tsso hooks use the configured LLM provider/model.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
hook.tsloaded.git-mem.yamlbut never forwardedconfig.llmtocreateContainer(), so LLM provider selection always fell back to env-var auto-detectionANTHROPIC_API_KEYandOPENAI_API_KEYpresent, Anthropic was always chosen (first in priority), causing enrichment to time out at 8sllm: config.llmtocreateContainer()so thellm:YAML section is respectedTest plan
llm: { provider: openai }to.git-mem.yaml, make a commit, verify log showssource: "llm-enrichment"instead of timeout🤖 Generated with Claude Code
Summary by CodeRabbit