Skip to content

Conversation

@esclipse
Copy link
Owner

Motivation

  • Remove a hardcoded API key embedded in the server route to eliminate a security and operational risk.
  • Allow the translation service credential to be rotated and scoped per environment without a code change.

Description

  • Replace the hardcoded key in app/api/translate/route.ts with a runtime lookup of process.env.GEEKAI_API_KEY.
  • Return a 500 JSON error when GEEKAI_API_KEY is missing to fail fast and clearly in misconfigured deployments.
  • Instantiate the OpenAI client inside POST using the environment-provided apiKey and retain the baseURL: 'https://geekai.co/api/v1' configuration.

Testing

  • No automated tests were executed for this change.
  • Local runtime checks performed: file updated and committed successfully using git commit (no test suite run).

Codex Task

@vercel
Copy link

vercel bot commented Dec 30, 2025

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

Project Deployment Review Updated (UTC)
mcp-test Ready Ready Preview, Comment Dec 30, 2025 3:42am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants