[PR #43] [CLOSED] Add support for LlamaCloud in the EU #43

Closed
opened 2026-02-16 03:16:46 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/auto_rfp/pull/43
Author: @roland-at-ailtir
Created: 12/27/2025
Status: Closed

Base: mainHead: roland/feature/add-support-for-eu


📝 Commits (10+)

  • c238202 Add agentic mode support for LlamaParse and fix eligibility extraction
  • 03d28d2 Refactor project index selection to single-select with auto-save
  • 17b37fe Fix ESLint configuration and resolve all lint errors
  • f912ce1 Add Vitest testing infrastructure with 173 unit tests
  • f3d62e5 Fix missing agenticMode in LlamaParse processing service
  • 5f86665 Merge branch 'main' into bug-fix
  • a5171a2 Merge bug-fix into dev
  • 78b7400 Fix Add Manually button routing and improve Vercel preview URL handling
  • eaf8949 Simplify IndexSelector to display-only mode
  • b87b676 Update .gitignore (with .devcontainer)

📊 Changes

53 files changed (+6369 additions, -433 deletions)

View changed files

.eslintrc.json (+3 -0)
📝 .gitignore (+2 -0)
📝 README.md (+3 -0)
📝 app/api/llamacloud/projects/route.ts (+2 -2)
📝 app/api/organizations/route.ts (+2 -2)
📝 app/api/projects/[projectId]/indexes/route.ts (+5 -5)
📝 app/help/page.tsx (+3 -3)
📝 app/login/actions.ts (+13 -2)
📝 app/login/confirmation/page.tsx (+2 -2)
📝 app/login/page.tsx (+2 -2)
📝 app/organizations/[orgId]/page.tsx (+9 -9)
📝 app/organizations/page.tsx (+6 -6)
📝 app/projects/[projectId]/questions/components/index-selector.tsx (+18 -118)
📝 app/projects/[projectId]/questions/components/no-questions-available.tsx (+1 -1)
📝 app/projects/[projectId]/questions/components/questions-provider.tsx (+0 -26)
📝 app/projects/[projectId]/questions/components/questions-section.tsx (+1 -5)
📝 app/projects/components/ai-suggestions-panel.tsx (+3 -3)
📝 app/projects/components/documents-section.tsx (+13 -5)
📝 app/projects/components/project-timeline.tsx (+6 -6)
📝 components/FileUploader.tsx (+1 -1)

...and 33 more files

📄 Description

This is V2 of this PR (without the env-var system refactoring; I will do that in the next PR as soon as this one is merged).

To support LlamaCloud in the EU we need to make the API_URL configurable.

To that extend I added the LLAMACLOUD_API_URL env var.

Note: This is already rebased on #42. Please merge #42 first.

Note: I am also fixing to small issues that created problems when loading the login-page. The pages now loads with creating the red issues bubble.


Add Configurable LlamaCloud API URL for Regional Support

Summary

Added support for configurable LlamaCloud API endpoints via the LLAMACLOUD_API_URL environment variable, enabling connections to regional LlamaCloud instances (e.g., EU region).

Motivation

Previously, all LlamaCloud API URLs were hardcoded to the US endpoint (https://api.cloud.llamaindex.ai). This prevented users from connecting to regional LlamaCloud deployments, such as the EU instance at https://api.cloud.eu.llamaindex.ai.

Changes

New Environment Variable

Files Modified (10 total)

Core Configuration:

  1. lib/env.ts - Added LLAMACLOUD_API_URL with US default

Services & Clients:
2. lib/services/llamacloud-client.ts - Updated to use ${env.LLAMACLOUD_API_URL}/api/v1
3. lib/llama-index-service.ts - Added hostname-only baseUrl for LlamaCloudIndex SDK
4. lib/llamaparse-service.ts - Added protocol+hostname baseUrl for LlamaParseReader SDK

API Routes (6 hardcoded URLs replaced):
5. app/api/llamacloud/projects/route.ts - 2 endpoints
6. app/api/organizations/route.ts - 2 endpoints
7. app/api/projects/[projectId]/indexes/route.ts - 2 endpoints

Documentation:
8. README.md - Added env var documentation with EU example
9. CLAUDE.md - Updated development documentation
10. .env - Updated example with EU endpoint

Technical Details

Different LlamaIndex components require different URL formats:

Component Format Example Usage
API fetch calls Full URL + /api/v1 https://api.cloud.eu.llamaindex.ai/api/v1/projects ${env.LLAMACLOUD_API_URL}/api/v1/{endpoint}
LlamaCloudIndex SDK Hostname only api.cloud.eu.llamaindex.ai new URL(env.LLAMACLOUD_API_URL).hostname
LlamaParseReader SDK Protocol + hostname https://api.cloud.eu.llamaindex.ai env.LLAMACLOUD_API_URL

Configuration Example

  # US region (default - can be omitted)
  LLAMACLOUD_API_URL=https://api.cloud.llamaindex.ai
  # EU region
  LLAMACLOUD_API_URL=https://api.cloud.eu.llamaindex.ai

Backward Compatibility

  • Fully backward compatible - No breaking changes
  • Existing deployments continue working without modification
  • Default value maintains current US endpoint behavior
  • Optional env var only needs to be set for non-US regions

Testing

  • Verified default behavior (US endpoint) when LLAMACLOUD_API_URL not set
  • Verified custom endpoint configuration
  • All existing functionality remains unchanged
  • URL format transformations work correctly for each SDK component

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/auto_rfp/pull/43 **Author:** [@roland-at-ailtir](https://github.com/roland-at-ailtir) **Created:** 12/27/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `roland/feature/add-support-for-eu` --- ### 📝 Commits (10+) - [`c238202`](https://github.com/run-llama/auto_rfp/commit/c23820259027d5534075622cd50a526aeb5f049b) Add agentic mode support for LlamaParse and fix eligibility extraction - [`03d28d2`](https://github.com/run-llama/auto_rfp/commit/03d28d2882eeb3c793e43a50b93430edbb4879a8) Refactor project index selection to single-select with auto-save - [`17b37fe`](https://github.com/run-llama/auto_rfp/commit/17b37fe5c7414ff579631f5b926437610a10de40) Fix ESLint configuration and resolve all lint errors - [`f912ce1`](https://github.com/run-llama/auto_rfp/commit/f912ce15de496d46872acefa12b9f8035acaf2cd) Add Vitest testing infrastructure with 173 unit tests - [`f3d62e5`](https://github.com/run-llama/auto_rfp/commit/f3d62e523328dc7452b067edd2f310c757529523) Fix missing agenticMode in LlamaParse processing service - [`5f86665`](https://github.com/run-llama/auto_rfp/commit/5f86665c9b9baa73d90c5cdc8864f3a26ad9756f) Merge branch 'main' into bug-fix - [`a5171a2`](https://github.com/run-llama/auto_rfp/commit/a5171a2395dbae23219f268f34d33f67471d7649) Merge bug-fix into dev - [`78b7400`](https://github.com/run-llama/auto_rfp/commit/78b7400e42ca2ab72f8c24b08ca1cc5b1eb5be71) Fix Add Manually button routing and improve Vercel preview URL handling - [`eaf8949`](https://github.com/run-llama/auto_rfp/commit/eaf89490b49719e1fb18c4f53d379459105be1bb) Simplify IndexSelector to display-only mode - [`b87b676`](https://github.com/run-llama/auto_rfp/commit/b87b676969d96f465b88a00374ec211b3c060707) Update .gitignore (with .devcontainer) ### 📊 Changes **53 files changed** (+6369 additions, -433 deletions) <details> <summary>View changed files</summary> ➕ `.eslintrc.json` (+3 -0) 📝 `.gitignore` (+2 -0) 📝 `README.md` (+3 -0) 📝 `app/api/llamacloud/projects/route.ts` (+2 -2) 📝 `app/api/organizations/route.ts` (+2 -2) 📝 `app/api/projects/[projectId]/indexes/route.ts` (+5 -5) 📝 `app/help/page.tsx` (+3 -3) 📝 `app/login/actions.ts` (+13 -2) 📝 `app/login/confirmation/page.tsx` (+2 -2) 📝 `app/login/page.tsx` (+2 -2) 📝 `app/organizations/[orgId]/page.tsx` (+9 -9) 📝 `app/organizations/page.tsx` (+6 -6) 📝 `app/projects/[projectId]/questions/components/index-selector.tsx` (+18 -118) 📝 `app/projects/[projectId]/questions/components/no-questions-available.tsx` (+1 -1) 📝 `app/projects/[projectId]/questions/components/questions-provider.tsx` (+0 -26) 📝 `app/projects/[projectId]/questions/components/questions-section.tsx` (+1 -5) 📝 `app/projects/components/ai-suggestions-panel.tsx` (+3 -3) 📝 `app/projects/components/documents-section.tsx` (+13 -5) 📝 `app/projects/components/project-timeline.tsx` (+6 -6) 📝 `components/FileUploader.tsx` (+1 -1) _...and 33 more files_ </details> ### 📄 Description This is V2 of this PR (without the env-var system refactoring; I will do that in the next PR as soon as this one is merged). To support LlamaCloud in the EU we need to make the API_URL configurable. To that extend I added the LLAMACLOUD_API_URL env var. Note: This is already rebased on #42. Please merge #42 first. Note: I am also fixing to small issues that created problems when loading the login-page. The pages now loads with creating the red issues bubble. --- # Add Configurable LlamaCloud API URL for Regional Support ## Summary Added support for configurable LlamaCloud API endpoints via the LLAMACLOUD_API_URL environment variable, enabling connections to regional LlamaCloud instances (e.g., EU region). ## Motivation Previously, all LlamaCloud API URLs were hardcoded to the US endpoint (https://api.cloud.llamaindex.ai). This prevented users from connecting to regional LlamaCloud deployments, such as the EU instance at https://api.cloud.eu.llamaindex.ai. ## Changes New Environment Variable - LLAMACLOUD_API_URL (optional) - Format: Protocol + hostname (e.g., https://api.cloud.eu.llamaindex.ai) - Default: https://api.cloud.llamaindex.ai (US) - Note: Do NOT include /api/v1 path in the URL Files Modified (10 total) Core Configuration: 1. lib/env.ts - Added LLAMACLOUD_API_URL with US default Services & Clients: 2. lib/services/llamacloud-client.ts - Updated to use ${env.LLAMACLOUD_API_URL}/api/v1 3. lib/llama-index-service.ts - Added hostname-only baseUrl for LlamaCloudIndex SDK 4. lib/llamaparse-service.ts - Added protocol+hostname baseUrl for LlamaParseReader SDK API Routes (6 hardcoded URLs replaced): 5. app/api/llamacloud/projects/route.ts - 2 endpoints 6. app/api/organizations/route.ts - 2 endpoints 7. app/api/projects/[projectId]/indexes/route.ts - 2 endpoints Documentation: 8. README.md - Added env var documentation with EU example 9. CLAUDE.md - Updated development documentation 10. .env - Updated example with EU endpoint ## Technical Details Different LlamaIndex components require different URL formats: | Component | Format | Example | Usage | |----------------------|---------------------|----------------------------------------------------|---------------------------------------------| | API fetch calls | Full URL + /api/v1 | https://api.cloud.eu.llamaindex.ai/api/v1/projects | ${env.LLAMACLOUD_API_URL}/api/v1/{endpoint} | | LlamaCloudIndex SDK | Hostname only | api.cloud.eu.llamaindex.ai | new URL(env.LLAMACLOUD_API_URL).hostname | | LlamaParseReader SDK | Protocol + hostname | https://api.cloud.eu.llamaindex.ai | env.LLAMACLOUD_API_URL | ## Configuration Example ```bash # US region (default - can be omitted) LLAMACLOUD_API_URL=https://api.cloud.llamaindex.ai ``` ```bash # EU region LLAMACLOUD_API_URL=https://api.cloud.eu.llamaindex.ai ``` ## Backward Compatibility - Fully backward compatible - No breaking changes - Existing deployments continue working without modification - Default value maintains current US endpoint behavior - Optional env var only needs to be set for non-US regions ## Testing - Verified default behavior (US endpoint) when LLAMACLOUD_API_URL not set - Verified custom endpoint configuration - All existing functionality remains unchanged - URL format transformations work correctly for each SDK component --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 03:16:46 -05:00
yindo closed this issue 2026-02-16 03:16:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/auto_rfp#43