Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

fix: set default AGENT_BASE_URL to production doc-agents URL#345

Merged
afterrburn merged 1 commit intomainfrom
devin/1769046389-set-default-agent-base-url
Jan 22, 2026
Merged

fix: set default AGENT_BASE_URL to production doc-agents URL#345
afterrburn merged 1 commit intomainfrom
devin/1769046389-set-default-agent-base-url

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Jan 22, 2026

Summary

Fixes 503 errors on AI search by setting a default value for AGENT_BASE_URL to https://p0f83a312791b60ff.agentuity.run. Previously, the middleware returned 503 if this env var was not explicitly set.

Changes:

  • Added default AGENT_BASE_URL in lib/config.ts and middleware.ts
  • Simplified middleware error handling to only check for AGENT_BEARER_TOKEN (since AGENT_BASE_URL now has a default)

Review & Testing Checklist for Human

  • Verify the hardcoded URL is correct: Confirm https://p0f83a312791b60ff.agentuity.run is the intended production doc-agents endpoint
  • Test AI search after deployment: Open the docs site, click the sparkles icon, and submit a query to verify the 503 error is resolved
  • Verify AGENT_BEARER_TOKEN is set in Cloudflare: This env var is still required and will cause 503 if missing

Note: The default URL is duplicated in two files. Consider extracting to a shared constant if this becomes a maintenance concern.

Notes

Summary by CodeRabbit

  • Chores
    • Enhanced configuration defaults for backend connectivity, reducing setup requirements.
    • Improved error messaging for environment variable validation.

✏️ Tip: You can customize this high-level summary in your review settings.

Co-Authored-By: srith@agentuity.com <rithsenghorn@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@afterrburn afterrburn merged commit 77b7070 into main Jan 22, 2026
1 check was pending
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 22, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces a default backend URL configuration constant and updates the agent base URL initialization logic to fall back to this default when environment variables are not provided. The explicit AGENT_BASE_URL requirement check has been removed with simplified error handling.

Changes

Cohort / File(s) Summary
Agent Base URL Configuration
lib/config.ts, middleware.ts
Introduced DEFAULT_AGENT_BASE_URL constant; agentBaseUrl now falls back to this default when environment variable not set; removed AGENT_BASE_URL requirement check in middleware; simplified error handling to only require AGENT_BEARER_TOKEN for authenticated endpoints

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 217f3d3 and 4f851f1.

📒 Files selected for processing (2)
  • lib/config.ts
  • middleware.ts

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@afterrburn afterrburn deleted the devin/1769046389-set-default-agent-base-url branch January 22, 2026 01:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant