sourcegraph/cmd/frontend
Stephen Gutekanst bd3baef6e0
pass ModelConfigInfo down to client.Get() for self-hosted-models (#63739)
This PR has a single goal: pass a new `ModelConfigInfo` type, which has
the `Provider` and `Model` we should use to serve a completions request,
down into `client.Get()`

This PR explicitly only handles the case we care about for Self-hosted
models, and all pieces of logic that I expect will be
replaced/superseded by your work @chrsmith are annotated with `//
TODO(slimsag): self-hosted-models:` comments so we can easily find and
remove them when your work is ready.

Every location I have modified has been carefully wrapped in an if
statement like `if conf.Get().SiteConfig().ModelConfiguration != nil` to
ensure that this change _only_ affects people who set the new
`"modelConfiguration"` site config property.

## Test plan

1. Configured `"modelConfiguration"` and removed `"completions"` in my
dev instances' site config.
2. Used VS Code chat to confirm I see this codepath is connected
end-to-end and I get a `TODO` error back:

<img width="679" alt="image"
src="https://github.com/sourcegraph/sourcegraph/assets/3173176/d3c07ffe-7ec2-4ad9-9251-2272ce36d44b">

## Changelog

N/A

---------

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2024-07-09 15:30:37 -07:00
..
auth auth: Make username from email deduplication dotcom only (#62747) 2024-05-17 14:56:42 +02:00
backend dotcom: Remove on-demand cloning of repositories (#63321) 2024-06-26 14:53:14 -07:00
dotcomproductsubscriptiontest feat/enterprise-portal: ConnectRPC layer for {Get/List}CodyGatewayAccess (#62771) 2024-05-27 13:39:57 -07:00
enterprise chore: centralize logic for disabling Batch Changes on dotcom (#63370) 2024-06-24 08:37:45 -07:00
envvar Move dotcom check out of cmd/frontend (#60810) 2024-03-04 16:05:16 +00:00
external fix/telemetry(auth): return authenticated context from session.SetActorFromUser (#62701) 2024-05-15 16:48:42 -07:00
globals chore: Simplify Branding (#61905) 2024-04-16 09:33:03 +02:00
graphqlbackend feat(Source): Properly render multi-line changelist messages from Perforce (#63728) 2024-07-09 17:52:05 -04:00
hubspot chore: remove obsolete tracking code for Cody App downloads (#63364) 2024-06-23 21:48:31 -07:00
internal pass ModelConfigInfo down to client.Get() for self-hosted-models (#63739) 2024-07-09 15:30:37 -07:00
oneclickexport dotcom: Remove on-demand cloning of repositories (#63321) 2024-06-26 14:53:14 -07:00
registry Move dotcom check out of cmd/frontend (#60810) 2024-03-04 16:05:16 +00:00
shared feat(cody): Expose Sg modelconfig data via HTTP REST API (#63604) 2024-07-03 10:07:33 -07:00
webhooks webhooks: Add support for secrets for Bitbucket Cloud (#63198) 2024-06-18 11:54:01 +02:00
BUILD.bazel omit go:embed of big assets from sg start single-program-experimental-blame-sqs (#63477) 2024-06-25 23:08:53 +00:00
image_test.yaml Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
main.go omit go:embed of big assets from sg start single-program-experimental-blame-sqs (#63477) 2024-06-25 23:08:53 +00:00
README.md

frontend

The frontend serves our web application and hosts our GraphQL API.

Typically there are multiple replicas running in production to scale with load.

Application data is stored in our PostgreSQL database.

Session data is stored in the Redis store, and non-persistent data is stored in the Redis cache.