mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
Fixes CODY-3269 Previously, the OpenAI-compatible API endpoints had paths like `/api/v1/chat/completions`, which went against an existing convention of keeping all APIs under the `/.api` prefix. We have a fair amount of internal tooling centered around the assumption that APIs have the `/.api` prefix so this PR corrects the mistake and moves the `/api/v1/chat/completions` endpoint to `/.api/llm/chat/completions`. I went with the prefix `/.api/llm` since these allow clients to interact with LLM features like `/chat/completions` or listing model information. These APIs happen to be compatible with OpenAI APIs but I think it will be more confusing to add something like "openai" or "openaicomptable" in the API endpoint. We can just document on our website that these endpoints are compatible with OpenAI clients. <!-- PR description tips: https://www.notion.so/sourcegraph/Write-a-good-pull-request-description-610a7fd3e613496eb76f450db5a49b6e --> ## Test plan Green CI. I also manually confirmed that I was able to use an OpenAI client to send requests to the new APIs. <!-- REQUIRED; info at https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> ## Changelog * Moved `/api/v1/chat/completions` to `/.api/llm/chat/completions`. The functionality is unchanged. <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c --> |
||
|---|---|---|
| .. | ||
| appliance | ||
| batcheshelper | ||
| blobstore | ||
| bundled-executor | ||
| cody-gateway | ||
| cody-gateway-config | ||
| customer-2315 | ||
| customer-4512 | ||
| embeddings | ||
| enterprise-portal | ||
| executor | ||
| executor-kubernetes | ||
| frontend | ||
| gitserver | ||
| loadtest | ||
| migrator | ||
| msp-example | ||
| pings | ||
| precise-code-intel-worker | ||
| repo-updater | ||
| searcher | ||
| server | ||
| sourcegraph | ||
| symbols | ||
| syntactic-code-intel-worker | ||
| telemetry-gateway | ||
| worker | ||
| README.md | ||
This directory contains Sourcegraph services and binaries.
When a services is added, removed, or when a service's dependencies change, update our architecture diagram.