Skip to content

fix(ai-novita): require clean api base urls#830

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

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

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • normalize Novita custom baseUrl values before appending /chat/completions
  • reject invalid URLs, non-http(s) schemes, credentials, query strings, and fragments before any network request
  • expand adapter tests for request payloads, dry runs, error excerpts, 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 Novita fail early with adapter-specific configuration errors.

Validation

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

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

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