Skip to content

MyCoder is not recognizing my config file #397

Open
@F-Educere

Description

@F-Educere

I created a configuration file like this in ~/.config/mycoder, however, it keeps pointing out a configuration error to consume the anthropic api, even though I didn't define the usage as being this:

`
// mycoder.config.js
export default {
// GitHub integration
githubMode: true,

// Browser settings
headless: true,
userSession: false,

// System browser detection settings
browser: {
// Whether to use system browsers or Playwright's bundled browsers
useSystemBrowsers: true,

// Preferred browser type (chromium, firefox, webkit)
preferredType: 'chromium',

// Custom browser executable path (overrides automatic detection)
// executablePath: null, // e.g., '/path/to/chrome'

},

// Model settings
provider: 'openai',
model: 'deepseek-r1:7b',
maxTokens: 4096,
temperature: 0.7,

// Custom settings
// customPrompt can be a string or an array of strings for multiple lines
customPrompt: '',
// Example of multiple line custom prompts:
// customPrompt: [
// 'Custom instruction line 1',
// 'Custom instruction line 2',
// 'Custom instruction line 3',
// ],
profile: false,

// Base URL configuration (for providers that need it)
baseUrl: 'https://ollama.sv3.cloud.atla.pro/ollama', // Example for Ollama

// MCP configuration
mcp: {
servers: [
{
name: 'example',
url: 'https://mcp.example.com',
auth: {
type: 'bearer',
token: 'your-token-here',
},
},
],
defaultResources: ['example://docs/api'],
defaultTools: ['example://tools/search'],
},
};
`

when executing the command:

mycoder "Implement a React component that displays a list of items"

I get the following error:
`[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.
Detected 2 browsers on the system
Available browsers:

  • Chrome (chromium) at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  • Firefox (firefox) at /Applications/Firefox.app/Contents/MacOS/firefox
    GitHub mode is enabled but there are issues with git/gh CLI tools:
  • GitHub CLI is not available. Please install gh CLI.
    GitHub mode requires git and gh CLI tools to be installed.
    Please install the missing tools or disable GitHub mode with --githubMode false

An error occurred:
Error: Error calling Anthropic API: 401 {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
Error: Error calling Anthropic API: 401 {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
at AnthropicProvider.generateText (file:///Users/saviocamacam/.nvm/versions/node/v18.17.1/lib/node_modules/mycoder/node_modules/mycoder-agent/src/core/llm/providers/anthropic.ts:184:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at toolAgent (file:///Users/saviocamacam/.nvm/versions/node/v18.17.1/lib/node_modules/mycoder/node_modules/mycoder-agent/src/core/toolAgent/toolAgentCore.ts:142:45)
at executePrompt (file:///Users/saviocamacam/.nvm/versions/node/v18.17.1/lib/node_modules/mycoder/src/commands/$default.ts:187:20)
at Object.handler (file:///Users/saviocamacam/.nvm/versions/node/v18.17.1/lib/node_modules/mycoder/src/commands/$default.ts:280:5)
0
[Token Usage Total] Root: input: 0 cache-writes: 0 cache-reads: 0 output: 0 COST: $0.00
Forcing exit after 5000ms timeout`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions