Skip to content

fix(ai-atlascloud): require clean api base urls#837

Open
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/atlascloud-clean-base-url
Open

fix(ai-atlascloud): require clean api base urls#837
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/atlascloud-clean-base-url

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • validate AtlasCloud custom baseUrl values before building the chat completions URL
  • reject invalid URLs, non-http(s) schemes, credentials, query strings, and fragments before any network request
  • keep trailing slash normalization covered while adding unsafe custom base URL cases

Why

The adapter trimmed trailing slashes, but still accepted malformed or surprising custom API bases. This change makes AtlasCloud fail early with adapter-specific configuration errors instead of sending requests to unclear destinations.

Validation

  • vitest run packages/ai/atlascloud/src/index.test.ts
  • tsc -p packages/ai/atlascloud/tsconfig.json --noEmit
  • git diff --check

Copilot AI review requested due to automatic review settings July 23, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants