Skip to content

chore: rename context module to avoid import collision#488

Merged
gelluisaac merged 7 commits into
Traqora:mainfrom
dinahmaccodes:issue/mix
Jun 30, 2026
Merged

chore: rename context module to avoid import collision#488
gelluisaac merged 7 commits into
Traqora:mainfrom
dinahmaccodes:issue/mix

Conversation

@dinahmaccodes

Copy link
Copy Markdown
Contributor

PR Description

Overview

This PR implements secure configuration & secrets management, a robust multi-provider LLM
service architecture with automatic fallback mechanisms, an interpretability suite (SHAP,
LIME, Decision Tree decision paths), and a database query optimization engine powered by
LLMs. It also includes fixes for pre-existing codebase bugs (import collisions, syntax
errors, and Pydantic schema generation issues).

Checklist

[✓] #440 [FEATURE] LLM Configuration & Secrets Management — Secure handling of API keys
and model configs
• Robust environment-based setting loaders ( astroml/llm/config.py ).
• Symmetric key encryption (JWE A256GCM) at rest with audit logging (
astroml/llm/secrets.py ).
• Sliding-window rate limiter & cost budget managers ( astroml/llm/rate_limiter.py ).
[✓] #439 [FEATURE] LLM Service Architecture — Flexible model routing and provider
integration
• Unified model input/output interfaces ( astroml/llm/providers/base.py ).
• Integration with OpenAI, Anthropic, and HuggingFace Hub (
astroml/llm/providers/openai.py , astroml/llm/providers/anthropic.py ,
astroml/llm/providers/local.py ).
• Exponential backoff retry logic and automatic provider fallback chains.
[✓] #413 [FEATURE] LLM Model Interpretability — Tools to explain model predictions
• SHAP and LIME approximation utilities ( astroml/llm/explainer.py ).
• Visualizable Decision Tree paths (exported in DOT format).
• Attention heatmaps and Markdown reports.
[✓] #410 [FEATURE] LLM-powered Query Optimization Engine
• Added query analyzer endpoint GET /api/v1/query/optimize .
• Parses query performance patterns, suggests index creation, and provides query
rewrites.
• Fully tested and integrated.

Fixes & Cleanup

• Resolved package-naming collision between astroml/llm/context.py and
astroml/llm/context/ directory by renaming module to blockchain_context.py .
• Fixed multiple pre-existing syntax and import errors ( api/routers/models.py ,
api/routers/validation.py , api/routers/init.py , api/auth/dependencies.py ).
• Made OpenTelemetry exporter imports lazy to prevent module import crashes when tracing is disabled.

Closes #440
Closes #439
Closes #413
Closes #410

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@dinahmaccodes Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@gelluisaac gelluisaac merged commit 3000534 into Traqora:main Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants