Compare commits
9 Commits
fix/vscode
...
feature/co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
181012b5ba | ||
|
|
409a97195a | ||
|
|
ee37e4bbbd | ||
|
|
6816882c5b | ||
|
|
1c8b1b405a | ||
|
|
cd197ba1b5 | ||
|
|
5359a33dca | ||
|
|
3e1b8b957e | ||
|
|
91b9f11c03 |
8
.changeset/huge-moose-prove.md
Normal file
8
.changeset/huge-moose-prove.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Can now configure baseURL of provider with `<PROVIDER>_BASE_URL`
|
||||||
|
|
||||||
|
- For example:
|
||||||
|
- `OPENAI_BASE_URL`
|
||||||
5
.changeset/tiny-dogs-change.md
Normal file
5
.changeset/tiny-dogs-change.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve mcp keys check in cursor
|
||||||
@@ -72,6 +72,7 @@ Taskmaster uses two primary methods for configuration:
|
|||||||
- `XAI_API_KEY`: Your X-AI API key.
|
- `XAI_API_KEY`: Your X-AI API key.
|
||||||
- **Optional Endpoint Overrides:**
|
- **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.
|
- **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).
|
- `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`).
|
- `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.
|
- `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.
|
# etc.
|
||||||
|
|
||||||
# Optional Endpoint Overrides
|
# 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/
|
# AZURE_OPENAI_ENDPOINT=https://your-azure-endpoint.openai.azure.com/
|
||||||
# OLLAMA_BASE_URL=http://custom-ollama-host:11434/api
|
# OLLAMA_BASE_URL=http://custom-ollama-host:11434/api
|
||||||
|
|
||||||
# Google Vertex AI Configuration (Required if using 'vertex' provider)
|
# Google Vertex AI Configuration (Required if using 'vertex' provider)
|
||||||
# VERTEX_PROJECT_ID=your-gcp-project-id
|
# VERTEX_PROJECT_ID=your-gcp-project-id
|
||||||
# VERTEX_LOCATION=us-central1
|
|
||||||
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-credentials.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|||||||
@@ -571,10 +571,11 @@ function getMcpApiKeyStatus(providerName, projectRoot = null) {
|
|||||||
const mcpConfigRaw = fs.readFileSync(mcpConfigPath, 'utf-8');
|
const mcpConfigRaw = fs.readFileSync(mcpConfigPath, 'utf-8');
|
||||||
const mcpConfig = JSON.parse(mcpConfigRaw);
|
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) {
|
if (!mcpEnv) {
|
||||||
// console.warn(chalk.yellow('Warning: Could not find taskmaster-ai env in mcp.json.'));
|
return false;
|
||||||
return false; // Structure missing
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let apiKeyToCheck = null;
|
let apiKeyToCheck = null;
|
||||||
@@ -782,9 +783,15 @@ function getAllProviders() {
|
|||||||
|
|
||||||
function getBaseUrlForRole(role, explicitRoot = null) {
|
function getBaseUrlForRole(role, explicitRoot = null) {
|
||||||
const roleConfig = getModelConfigForRole(role, explicitRoot);
|
const roleConfig = getModelConfigForRole(role, explicitRoot);
|
||||||
return roleConfig && typeof roleConfig.baseURL === 'string'
|
if (roleConfig && typeof roleConfig.baseURL === 'string') {
|
||||||
? roleConfig.baseURL
|
return roleConfig.baseURL;
|
||||||
: undefined;
|
}
|
||||||
|
const provider = roleConfig?.provider;
|
||||||
|
if (provider) {
|
||||||
|
const envVarName = `${provider.toUpperCase()}_BASE_URL`;
|
||||||
|
return resolveEnvVariable(envVarName, null, explicitRoot);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|||||||
Reference in New Issue
Block a user