sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.3k stars 219 forks source link

Ollama: Fix Ollama models not connected to correct client #4564

Closed abeatrix closed 1 month ago

abeatrix commented 1 month ago

The issue was caused by model providers being capitalized, which was not taken into account when matching clients. This change converts the model provider to lowercase before looking up the corresponding client.

Test plan

  1. Choose an Ollama model
  2. Say hello to Cody

Before: Cody will response that it's Claude to confirm we are not connected to the Ollama client.

image

After: No more Claude in the response.

image