Skip to content

Maintainer/ankan - #93

Merged
AnkanSaha merged 5 commits into
mainfrom
maintainer/ankan
Jul 27, 2026
Merged

Maintainer/ankan#93
AnkanSaha merged 5 commits into
mainfrom
maintainer/ankan

Conversation

@AnkanSaha

Copy link
Copy Markdown
Member

This pull request introduces a comprehensive AI-powered provisioning agent to the dashboard, updates the documentation to reflect the new AI features, and adds several robustness and concurrency improvements to the load balancer creation flow. The most important changes are summarized below.


AI Provisioning Agent Integration

  • Added a new AI agent feature to the dashboard, allowing users to provision and manage load balancers via natural language prompts. This includes new UI components (AiPromptCard, AiProgressOverlay) and backend streaming using streamAiGeneration and SSE events. [1] [2] [3] [4] [5]
  • Updated .github/workflows/deploy.yml to inject MISTRAL_API_KEY and OPENROUTER_API_KEY into Kubernetes secrets for enabling AI features.
  • Updated .env and deployment documentation to include new AI and Redis environment variables, and clarified how secrets are managed for Kubernetes deployments.

Documentation and Project Structure

  • Major expansion of AGENTS.md:
    • Documented the new AI agent API (/api/ai/generate), its tools, failure handling, model ladder, and concurrency model. [1] [2] [3]
    • Added new files/services for the AI agent, including types, service structure, and utility for Redis-based resource locking. [1] [2] [3]
    • Clarified the relationship between AGENTS.md and CLAUDE.md and improved component listings. [1] [2]

Load Balancer Creation Robustness

  • Introduced a Redis-based mutex (resourceLock.ts) to serialize concurrent creates of the same load balancer name, preventing race conditions and accidental deletions during rollback. [1] [2]
  • Updated the uniqueness constraint for scriptName to be per user (compound index with userId), and provided migration instructions for MongoDB. [1] [2]

Cloudflare Integration Improvements

  • Improved hostname conflict detection by checking both Custom Domains and Worker Routes, preventing accidental traffic rerouting. [1] [2]

Testing and Miscellaneous

  • Clarified test requirements: AI tests now mock model providers and do not require API keys or network calls; server tests require unique firebaseUid values.
  • Minor UI and documentation cleanups, such as removing the Blue/Green Deployments feature from the landing page.

These changes collectively add a powerful, safe, and well-documented AI provisioning workflow, improve concurrency handling, and ensure the documentation and environment setup are up to date for both developers and operators.

- Add audit service to record AI run details including user ID, prompt, trace, outcome, duration, and errors.
- Introduce logging service for AI runs to provide consistent console output during processing.
- Create model provider service to manage API keys and model configurations for different providers.
- Implement model router service to handle invoking models with fallback mechanisms and error classification.
- Add quota service to manage provider and model exhaustion states using Redis.
- Introduce rate limit service to control request pacing for models.
- Create SSE service for streaming events to clients.
- Develop tools service for managing load balancers with user confirmation for destructive actions.
- Define AI types for better type safety and clarity in AI-related operations.
- Update load balancer controllers and orchestrators to support new features and validations.
- Enhance hostname service to check for conflicts with existing Cloudflare Worker routes.
- Add new routes for AI operations in the application.
- Extend Cloudflare client to retrieve worker routes for better conflict management.
- Introduce resource locking utility to prevent race conditions during load balancer creation.
@AnkanSaha AnkanSaha self-assigned this Jul 27, 2026
@gitguardian

gitguardian Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
35213423 Triggered Generic High Entropy Secret 33f0dad server/src/tests/unit/ai/tools.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@AnkanSaha
AnkanSaha merged commit 769a9bd into main Jul 27, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant