sourcegraph/cmd
Chris Smith 3cb1c4528d
Update CodyLLMConfiguration GraphQL object to be modelconfig aware (#63886)
We recently updated the completions APIs to use the `modelconfig` system
for managing LLM model configuration. Behind the scenes, we
automatically converted the existing site configuration ("completions
config") into the newer format so things work as expected.

However, the GraphQL view of the Sourcegraph instance's LLM
configuration was not updated to use the `modelconfig` system. And so fi
the site admin and opted into using the new-style of configuration data,
the data returned would be all sorts of wrong.

(Because the GraphQL handler looked for the "completions config" part of
the site config, and not the newer "model configuration" section.)

This PR updates the `CodyLLMConfiguration` GraphQL resolver to return
the data from the modelconfig component of the Sourcegraph instance.

Some careful refactoring was needed to avoid a circular dependency in
the Go code. So the resolver's type _declaration_ is in the
`graphqlbackend` package. But it's _definition_ is in
`internal/modelconfig`.

## Test plan

I only tested these changes manually.

If you open the Sourcegraph instance's API console, this is the GraphQL
query to serve all of the data:

```gql
{
  site {
    codyLLMConfiguration {
      chatModel
      fastChatModel
      completionModel
      provider
      disableClientConfigAPI
      chatModelMaxTokens
      fastChatModelMaxTokens
      completionModelMaxTokens
    }
  }
}
```

## Changelog

NA
2024-07-17 12:38:14 -07:00
..
appliance chore(appliance): Stub out react UI expected URIs and JSON API (#63741) 2024-07-15 14:48:38 -04:00
batcheshelper bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
blobstore bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
bundled-executor bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
cody-gateway Update flagging.go 2024-07-16 07:15:40 -07:00
cody-gateway-config Several fixes around merging modelconfig, and the current Cody Gateway data (#63814) 2024-07-15 17:14:28 +00:00
embeddings lib/background: upgrade Routine interface with context and errors (#62136) 2024-05-24 10:04:55 -04:00
enterprise-portal chore/enterpriseportal: simplify display_name constraint (#63835) 2024-07-16 10:45:17 -07:00
executor chore/deps: upgrade grpc, prometheus/common (#63328) 2024-06-19 09:55:44 -04:00
executor-kubernetes bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
frontend Update CodyLLMConfiguration GraphQL object to be modelconfig aware (#63886) 2024-07-17 12:38:14 -07:00
gitserver Update comment and decode bytes instead (#63754) 2024-07-11 09:40:51 +02:00
loadtest chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
migrator chore(ci): conditionally stamp genrules (#63204) 2024-06-12 15:04:43 +02:00
msp-example msp/runtime: split contract into JobContract and ServiceContract (#63494) 2024-06-26 19:46:10 +00:00
pings msp/runtime: split contract into JobContract and ServiceContract (#63494) 2024-06-26 19:46:10 +00:00
precise-code-intel-worker chore: Change errors.HasType to respect multi-errors (#63024) 2024-06-06 13:02:14 +00:00
repo-updater scheduler: Simplify query for uncloned repos (#63681) 2024-07-10 02:24:32 +02:00
searcher Structural search: fix precise lang filtering (#63791) 2024-07-15 09:20:21 +02:00
server feat/bazel: //cmd/{frontend,server} targets that don't include client bundle for backend integration tests (#62877) 2024-05-28 14:32:48 +01:00
sourcegraph support fast, simple sg start single-program-experimental-blame-sqs for local dev (#63435) 2024-06-24 21:12:47 +00:00
symbols symbols: Make symbols specific code internal (#63736) 2024-07-10 01:26:22 +02:00
syntactic-code-intel-worker Syntactic indexing produce scip files (#63580) 2024-07-09 13:49:55 +02:00
telemetry-gateway chore/telemetrygateway: gracefully handle sams introspectToken cancelation (#63809) 2024-07-15 10:45:00 -07:00
worker chore(worker): disable jobs based on ENVs (#63853) 2024-07-16 18:07:22 +02:00
README.md Reminder to keep architecture diagram in-sync (#36869) 2022-06-08 19:40:36 -07:00

This directory contains Sourcegraph services and binaries.

When a services is added, removed, or when a service's dependencies change, update our architecture diagram.