Skip to content

fix(ai-nebius): require clean api base urls#833

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

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

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • normalize Nebius custom baseUrl values before appending /v1/chat/completions
  • reject invalid URLs, non-http(s) schemes, credentials, query strings, and fragments before any network request
  • extend tests for trailing slash normalization and unsafe custom base URLs

Why

The adapter currently concatenates user-provided baseUrl directly into the request URL. That can produce malformed request paths or surprising destinations. This change makes Nebius fail early with adapter-specific configuration errors.

Validation

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

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

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