Providers: Abacus connectivity error #4164

Closed
opened 2026-02-16 17:42:51 -05:00 by yindo · 9 comments
Owner

Originally created by @lucaschallamel on GitHub (Jan 4, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When I try to use Opencode with Abacus, I get this message: Not Found: Method chat/completions/chat/completions not found

Plugins

No response

OpenCode version

1.0.223

Steps to reproduce

  1. Login to Abacus with a valid API key
  2. Launch Opencode
  3. Select a an Abacus model
  4. send q request

Screenshot and/or share link

Originally created by @lucaschallamel on GitHub (Jan 4, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When I try to use Opencode with Abacus, I get this message: Not Found: Method chat/completions/chat/completions not found ### Plugins _No response_ ### OpenCode version 1.0.223 ### Steps to reproduce 1. Login to Abacus with a valid API key 2. Launch Opencode 3. Select a an Abacus model 4. send q request ### Screenshot and/or share link <!-- Uploading "Screenshot 2026-01-04 at 16.13.24.png"... —> <!-- Uploading "Screenshot 2026-01-04 at 16.13.24.png"... —> ### Operating System macOS 26.1 ### Terminal iTerm2
yindo added the bug label 2026-02-16 17:42:51 -05:00
yindo closed this issue 2026-02-16 17:42:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 4, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #195: Attempting to use custom provider with OpenAI-compatible endpoint - similar error pattern with undefined endpoint in URL
  • #5674: Custom OpenAI-compatible provider options not being passed to API calls - configuration options not reaching API calls
  • #5210: Custom OpenAI-compatible provider returns no text content - issues with custom endpoint configurations

The "Method chat/completions/chat/completions not found" error suggests the endpoint path may be duplicated in the request, which could indicate a configuration issue with how the Abacus provider URL is being constructed.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 4, 2026): This issue might be a duplicate of existing issues. Please check: - #195: Attempting to use custom provider with OpenAI-compatible endpoint - similar error pattern with undefined endpoint in URL - #5674: Custom OpenAI-compatible provider options not being passed to API calls - configuration options not reaching API calls - #5210: Custom OpenAI-compatible provider returns no text content - issues with custom endpoint configurations The "Method chat/completions/chat/completions not found" error suggests the endpoint path may be duplicated in the request, which could indicate a configuration issue with how the Abacus provider URL is being constructed. Feel free to ignore if none of these address your specific case.
Author
Owner

@dantoac commented on GitHub (Jan 10, 2026):

Seems the BaseURL for the provider is wrong. You can overload it in .config/opencode.json

Example:

{ "provider": {
      "Abacus": {
	    "npm": "@ai-sdk/openai-compatible",
	    "name": "Abacus AI",
	    "options": {
		"baseURL": "https://routellm.abacus.ai/v1/"
	    },
	    "models": {
		"gpt-5": {
		    "name": "GPT-5"
		},
	    }
	}
}

EDIT: The expected structure seems to be different, as some models seems to work only a few times after some retries. I just tested GPT-5, Claude and route-llm in Plan mode.

I can confirm that GLM-4.7 worked at first try, so it should be someting regarding the structure accepted by abacus.

FWIW, in https://abacus.ai/app/route-llm-apis says:

Parameters

Our API follows the [OpenAI Chat Completions API spec](https://platform.openai.com/docs/api-reference/chat/create), with a few limitations outlined below:

• We only support the following parameters:

    model
    messages
    max_tokens
    stream
    temperature
    stop
    n
    presence_penalty
    frequency_penalty
    logprobs (not supported for gpt-5)
    response_format (only {"type": "json"})
@dantoac commented on GitHub (Jan 10, 2026): Seems the BaseURL for the provider is wrong. You can overload it in `.config/opencode.json` Example: ```:json { "provider": { "Abacus": { "npm": "@ai-sdk/openai-compatible", "name": "Abacus AI", "options": { "baseURL": "https://routellm.abacus.ai/v1/" }, "models": { "gpt-5": { "name": "GPT-5" }, } } } ``` EDIT: The expected structure seems to be different, as some models seems to work only a few times after some retries. I just tested GPT-5, Claude and route-llm in Plan mode. I can confirm that GLM-4.7 worked at first try, so it should be someting regarding the structure accepted by abacus. FWIW, in https://abacus.ai/app/route-llm-apis says: ``` Parameters Our API follows the [OpenAI Chat Completions API spec](https://platform.openai.com/docs/api-reference/chat/create), with a few limitations outlined below: • We only support the following parameters: model messages max_tokens stream temperature stop n presence_penalty frequency_penalty logprobs (not supported for gpt-5) response_format (only {"type": "json"}) ```
Author
Owner

@dantoac commented on GitHub (Jan 10, 2026):

GLM-4.7 responded with "Bad Request: Invalid role "tool" in messages. Must be one of user, assistant, or system.", so confirming the missing parameter.

@dantoac commented on GitHub (Jan 10, 2026): GLM-4.7 responded with "Bad Request: Invalid role "tool" in messages. Must be one of user, assistant, or system.", so confirming the missing parameter.
Author
Owner

@meirm commented on GitHub (Jan 10, 2026):

This worked for me

cat .config/opencode/opencode.json

{
  "provider": {
    "abacus": {
      "name": "Abacus AI",
      "npm": "@ai-sdk/openai-compatible",
      "models": {
        "gpt-5": {
          "name": "GPT-5"
        }
      },
      "options": {
        "baseURL": "https://routellm.abacus.ai/v1/"
      }
    }
  },
  "$schema": "https://opencode.ai/config.json"
}
@meirm commented on GitHub (Jan 10, 2026): This worked for me cat .config/opencode/opencode.json ``` { "provider": { "abacus": { "name": "Abacus AI", "npm": "@ai-sdk/openai-compatible", "models": { "gpt-5": { "name": "GPT-5" } }, "options": { "baseURL": "https://routellm.abacus.ai/v1/" } } }, "$schema": "https://opencode.ai/config.json" } ```
Author
Owner

@InSelfControll commented on GitHub (Jan 13, 2026):

how can I make it work with all the models of abacus ai ?
Currently the main issue that it sends this twice: Not Found: Method chat/completions/chat/completions not found.
Looks like someone messed up in the app code and wrote twice /chat/compilations in the request and that's why it fails.

@InSelfControll commented on GitHub (Jan 13, 2026): how can I make it work with all the models of abacus ai ? Currently the main issue that it sends this twice: Not Found: Method chat/completions/chat/completions not found. Looks like someone messed up in the app code and wrote twice /chat/compilations in the request and that's why it fails.
Author
Owner

@dantoac commented on GitHub (Jan 14, 2026):

how can I make it work with all the models of abacus ai ? Currently the main issue that it sends this twice: Not Found: Method chat/completions/chat/completions not found. Looks like someone messed up in the app code and wrote twice /chat/compilations in the request and that's why it fails.

Hi, you need to use the "baseURL": "https://routellm.abacus.ai/v1/" solution proposed above, in your ~/.config/opencode/opencode.json

@dantoac commented on GitHub (Jan 14, 2026): > how can I make it work with all the models of abacus ai ? Currently the main issue that it sends this twice: Not Found: Method chat/completions/chat/completions not found. Looks like someone messed up in the app code and wrote twice /chat/compilations in the request and that's why it fails. Hi, you need to use the "baseURL": "https://routellm.abacus.ai/v1/" solution proposed above, in your ~/.config/opencode/opencode.json
Author
Owner

@rekram1-node commented on GitHub (Jan 15, 2026):

Btw models.dev is the models api we source from and maintain, PRs to fix or update or add are always welcome.

@rekram1-node commented on GitHub (Jan 15, 2026): Btw models.dev is the models api we source from and maintain, PRs to fix or update or add are always welcome.
Author
Owner

@rekram1-node commented on GitHub (Jan 15, 2026):

Thanks for providing work around tho @dantoac ill update models.dev

@rekram1-node commented on GitHub (Jan 15, 2026): Thanks for providing work around tho @dantoac ill update models.dev
Author
Owner

@rekram1-node commented on GitHub (Jan 15, 2026):

you should be able to remove it from your config if you run:
opencode models --refresh

And then rm from cfg

And then try again

Caches refresh automatically but this will force it

@rekram1-node commented on GitHub (Jan 15, 2026): you should be able to remove it from your config if you run: `opencode models --refresh` And then rm from cfg And then try again Caches refresh automatically but this will force it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4164