Skip to content

Providers: Abacus connectivity error #6836

Closed

Description

@lucaschallamel

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

Activity

  1. github-actions commented on Jan 4, 2026

    @github-actions
    Contributor

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

    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.

  2. dantoac commented on Jan 10, 2026

    @dantoac

    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"})
    
  3. dantoac commented on Jan 10, 2026

    @dantoac

    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.

  4. meirm commented on Jan 10, 2026

    @meirm

    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"
    }
    
  5. InSelfControll commented on Jan 13, 2026

    @InSelfControll

    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.

  6. dantoac commented on Jan 15, 2026

    @dantoac

    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

  7. rekram1-node commented on Jan 15, 2026

    @rekram1-node
    Collaborator

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

  8. rekram1-node commented on Jan 15, 2026

    @rekram1-node
    Collaborator

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

  9. rekram1-node commented on Jan 15, 2026

    @rekram1-node
    Collaborator

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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