Skip to content

[Bug]: OCO_API_URL is ignored by DeepSeek(maybe more) engines #539

@ImFeH2

Description

@ImFeH2

Opencommit Version

3.2.11

Node Version

25.6.0

NPM Version

11.8.0

What OS are you seeing the problem on?

Other Linux Distro

What happened?

When setting OCO_API_URL to use a custom endpoint, the DeepSeek engine completely ignores it and always sends requests to the hardcoded https://api.deepseek.com/v1.

In src/engine/deepseek.ts, the constructor spreads config before the hardcoded baseURL:

super({
  ...config,
  baseURL: 'https://api.deepseek.com/v1'
});

Since baseURL comes after ...config, it always overwrites the user's OCO_API_URL setting. The fix is to reverse the order so the hardcoded URL acts as a default:

super({
  baseURL: 'https://api.deepseek.com/v1',
  ...config,
});

Expected Behavior

OCO_API_URL should be respected by all engines. The hardcoded URL should only be used as a default when no custom URL is configured.

Current Behavior

The DeepSeek engine completely ignores OCO_API_URL and always sends requests to the hardcoded https://api.deepseek.com/v1`

Possible Solution

DeepSeek: Put baseURL before ...config in constructor
Groq: Use config.baseURL = config.baseURL || '...'
OpenRouter: Use config.baseURL || '...' in axios.create()

Steps to Reproduce

oco config set OCO_AI_PROVIDER=deepseek
oco config set OCO_API_URL=https://proxy.example.com

Then run oco — requests still go to api.deepseek.com

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions