Skip to content

fix: remove API key prefix validation#47

Merged
pablopunk merged 9 commits into
mainfrom
fix-api-keys
Apr 23, 2026
Merged

fix: remove API key prefix validation#47
pablopunk merged 9 commits into
mainfrom
fix-api-keys

Conversation

@pablopunk
Copy link
Copy Markdown
Owner

Remove hardcoded prefix checks (sk-, api-, sk-ant-) from all validators. Validation now relies solely on actual API calls to test key validity.

This enables providers like Fireworks AI (fw- prefix) and any future providers with non-standard key formats to work without code changes.

  • OpenAI-compatible: remove sk-/api- prefix check
  • Anthropic: remove sk-ant- prefix check
  • OpenAI: remove sk- prefix check
  • OpenCode: remove sk- prefix check

Fixes: API key validation was rejecting valid Fireworks AI keys (fw- prefix)

When the preview server fails to start, show a 'Fix with Doce' button
that sends the error message to the AI chat for automated troubleshooting.

- Add onFixWithDoce callback prop to PreviewPanel
- Wire up handleSend from useChatPanel in ProjectContentWrapper
- Send formatted prompt with error details to AI agent
Remove hardcoded prefix checks (sk-, api-, sk-ant-) from all validators.
Validation now relies solely on actual API calls to test key validity.
This enables providers like Fireworks AI (fw- prefix) and any future
providers with non-standard key formats to work without code changes.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
doce-dev-www Ready Ready Preview, Comment Apr 23, 2026 5:29pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@pablopunk has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 29 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 35 minutes and 29 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7d0f6592-f459-477a-8ccc-c35707362604

📥 Commits

Reviewing files that changed from the base of the PR and between 1cc3134 and 10dbeff.

📒 Files selected for processing (5)
  • .github/workflows/pr-preview.yml
  • Dockerfile
  • src/components/preview/PreviewPanel.tsx
  • src/components/projects/ProjectContentWrapper.tsx
  • src/server/opencode/apiKeyValidation.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pablopunk pablopunk merged commit ce8a15a into main Apr 23, 2026
7 of 8 checks passed
@pablopunk pablopunk deleted the fix-api-keys branch April 23, 2026 17:30
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.

1 participant