An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.
JavaScript aicursorcursor-aicursorailovablelovable-devroocodetask-managertaskstasks-listwindsurfwindsurf-ai
Feature/compatibleapisupport (#830)
Ralph Khreishe9d1bc238552
diff --git a/.changeset/huge-moose-prove.md b/.changeset/huge-moose-prove.mdnew file mode 100644index 00000000..f45e24fb--- /dev/null+++ b/.changeset/huge-moose-prove.md@@ -0,0 +1,8 @@+---+"task-master-ai": minor+---++Can now configure baseURL of provider with `<PROVIDER>_BASE_URL`++- For example:+ - `OPENAI_BASE_URL`diff --git a/.changeset/tiny-dogs-change.md b/.changeset/tiny-dogs-change.mdnew file mode 100644index 00000000..0396f2f4--- /dev/null+++ b/.changeset/tiny-dogs-change.md@@ -0,0 +1,5 @@+---+"task-master-ai": patch+---++Improve mcp keys check in cursordiff --git a/docs/configuration.md b/docs/configuration.mdindex 77b5c228..867f29ac 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -72,6 +72,7 @@ Taskmaster uses two primary methods for configuration:- `XAI_API_KEY`: Your X-AI API key.- **Optional Endpoint Overrides:**- **Per-role `baseURL` in `.taskmasterconfig`:** You can add a `baseURL` property to any model role (`main`, `research`, `fallback`) to override the default API endpoint for that provider. If omitted, the provider's standard endpoint is used.+ - **Environment Variable Overrides (`<PROVIDER>_BASE_URL`):** For greater flexibility, especially with third-party services, you can set an environment variable like `OPENAI_BASE_URL` or `MISTRAL_BASE_URL`. This will override any `baseURL` set in the configuration file for that provider. This is the recommended way to connect to OpenAI-compatible APIs.- `AZURE_OPENAI_ENDPOINT`: Required if using Azure OpenAI key (can also be set as `baseURL` for the Azure model role).- `OLLAMA_BASE_URL`: Override the default Ollama API URL (Default: `http://localhost:11434/api`).- `VERTEX_PROJECT_ID`: Your Google Cloud project ID for Vertex AI. Required when using the 'vertex' provider.@@ -131,13 +132,14 @@ PERPLEXITY_API_KEY=pplx-your-key-here# etc.# Optional Endpoint Overrides+# Use a specific provider's base URL, e.g., for an OpenAI-compatible API+# OPENAI_BASE_URL=https://api.third-party.com/v1+## AZURE_OPENAI_ENDPOINT=https://your-azure-endpoint.openai.azure.com/# OLLAMA_BASE_URL=http://custom-ollama-host:11434/api# Google Vertex AI Configuration (Required if using 'vertex' provider)# VERTEX_PROJECT_ID=your-gcp-project-id-# VERTEX_LOCATION=us-central1-# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-credentials.json```## Troubleshootingdiff --git a/scripts/modules/config-manager.js b/scripts/modules/config-manager.jsindex 30630452..c9ba8ad3 100644--- a/scripts/modules/config-manager.js+++ b/scripts/modules/config-manager.js@@ -571,10 +571,11 @@ function getMcpApiKeyStatus(providerName, projectRoot = null) {const mcpConfigRaw = fs.readFileSync(mcpConfigPath, 'utf-8');const mcpConfig = JSON.parse(mcpConfigRaw);- const mcpEnv = mcpConfig?.mcpServers?.['taskmaster-ai']?.env;+ const mcpEnv =+ mcpConfig?.mcpServers?.['task-master-ai']?.env ||+ mcpConfig?.mcpServers?.['taskmaster-ai']?.env;if (!mcpEnv) {- // console.warn(chalk.yellow('Warning: Could not find taskmaster-ai env in mcp.json.'));- return false; // Structure missing+ return false;}let apiKeyToCheck = null;@@ -782,9 +783,15 @@ function getAllProviders() {function getBaseUrlForRole(role, explicitRoot = null) {const roleConfig = getModelConfigForRole(role, explicitRoot);- return roleConfig && typeof roleConfig.baseURL === 'string'- ? roleConfig.baseURL- : undefined;+ if (roleConfig && typeof roleConfig.baseURL === 'string') {+ return roleConfig.baseURL;+ }+ const provider = roleConfig?.provider;+ if (provider) {+ const envVarName = `${provider.toUpperCase()}_BASE_URL`;+ return resolveEnvVariable(envVarName, null, explicitRoot);+ }+ return undefined;}export {