Skip to content

Unable to use Ollama models - Adding chat/completions to URL #436

Open

Description

@clickbrain

I have my Ollama endpoint on another machine and have a domain mapped to the endpoint. When I try to use it I get an error and logs seems to be saying it is not found. The model is installed, but it looks like Source is adding chat/completions to the URL. Is there any way to change this?

Activity

  1. changed the title [-]Unable to use Ollama models - Affing chat/completions to URL[/-] [+]Unable to use Ollama models - Adding chat/completions to URL[/+] on Nov 7, 2024
  2. jaimedevelop commented on Nov 29, 2024

    @jaimedevelop

    It happens the same to me. Ollama runs but somehow srcbook cannot get the models. I have srcbook running through WSL on windows.

  3. clickbrain commented on Jan 2, 2025

    @clickbrain
    Author

    Thought I would check in on this again to see if there is a workaround.

  4. nichochar commented on Jan 19, 2025

    @nichochar
    Contributor

    We're using the ai SDK for ollama so I'm surprised this is happening. Can you share more about the configuration in settings and the logs you're seeing?

  5. abraganu-ryestrategy commented on Feb 24, 2025

    @abraganu-ryestrategy

    I'm having the same problem and it seems that the error is trying to reach this endpoint http://127.0.0.1:11434/api/chat/completions instead of this http://127.0.0.1:11434/api/chat my configuration is next

    Image

    But srcbook keep adding the completions word at the end of the url

    This is the error in the console

    APICallError [AI_APICallError]: Not Found
        {
      cause: undefined,
      url: 'http://127.0.0.1:11434/api/chat/completions',
      requestBodyValues: {
        model: 'mistral-nemo',
        logit_bias: undefined,
        logprobs: undefined,
        top_logprobs: undefined,
        user: undefined,
        parallel_tool_calls: undefined,
        max_tokens: undefined,
        temperature: 0,
        top_p: undefined,
        frequency_penalty: undefined,
        presence_penalty: undefined,
        stop: undefined,
        seed: undefined,
        response_format: undefined,
        messages: [ [Object], [Object] ],
        tools: undefined,
        tool_choice: undefined
      },
      statusCode: 404,
      responseHeaders: {
        'content-length': '18',
        'content-type': 'text/plain',
        date: 'Mon, 24 Feb 2025 00:38:02 GMT'
      },
      responseBody: '404 page not found',
      isRetryable: false,
      data: undefined,
      [Symbol(vercel.ai.error)]: true,
      [Symbol(vercel.ai.error.AI_APICallError)]: true
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions