Conversation
There was a problem hiding this comment.
Pull request overview
Lazy-initializes the shared Langfuse client to avoid import-time side effects (e.g., requiring env vars at import), and allows Configs to tolerate unknown environment variables via extra="ignore".
Changes:
- Refactored
shared_client.pyand__init__.pyto usecached_propertyand module-level__getattr__for lazy Langfuse client creation. - Added
extra="ignore"to the pydanticConfigssettings so unknown env vars are silently skipped. - Bumped
aieng-agentsfrom 0.1.0 → 0.1.1.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
aieng-agents/aieng/agents/langfuse/shared_client.py |
Wraps client in _LangfuseClientManager with cached_property; adds module __getattr__ for lazy access |
aieng-agents/aieng/agents/langfuse/__init__.py |
Re-exports langfuse_client lazily via __getattr__ |
aieng-agents/aieng/agents/env_vars.py |
Adds extra="ignore" to Configs |
aieng-agents/pyproject.toml |
Version bump to 0.1.1 |
pyproject.toml |
Updates dependency to >=0.1.1 |
uv.lock |
Reflects version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
amrit110
approved these changes
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Fix
Short Description
langfuse_clientby using lazy initialization.Configscan be used in other environments.Tests Added
...