Skip to content

fix(ai-groq): require clean api base urls#840

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/groq-clean-base-url
Jul 24, 2026
Merged

fix(ai-groq): require clean api base urls#840
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/groq-clean-base-url

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • validate Groq 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 Groq fail early with adapter-specific configuration errors instead of sending requests to unclear destinations.

Validation

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

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

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.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

2 similar comments
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio
ralyodio merged commit 45b0825 into profullstack:master Jul 24, 2026
4 checks passed
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.

3 participants