sourcegraph/internal/modelconfig
Chris Smith b0bb67b47c
Update the default Sourcegraph-supplied LLM models (#64281)
This PR sets the defaults for "Sourcegraph supplied LLM models". 

## When will these "defaults" be used?

These models will _only_ be used IFF the Sourcegraph instance is
_explicitly_ using the newer "modelConfiguration" site configuration
data. (And opts into using Sourcegraph-supplied LLM models.)

If the Sourcegraph instance is using the older "completions"
configuration blob, then _only_ the user-supplied models will be used.
(Or, based on the specific defaults defined in the code for the
completions provider.)

## What about Cody Free or Cody Pro?

😬 yeah, we're going to need to deal with that later. Currently
Sourcegraph.com is _not_ using the newer "modelConfiguration" site
configuration, and instead we have some hacks in the code to ignore the
internal modelconfig. See this "super-shady hack":

e5178a6bc0/cmd/frontend/internal/httpapi/completions/get_model.go (L425-L455)

So we are just erring on the side of having Cody Free / Cody Pro "do
whatever they do now", and this PR won't have any impact on that.

We _do_ want Sourcegraph.com to only return this data, but there are a
few things we need to get straightened out first. (e.g. Cody Gateway
being ware of mrefs, and having Cody Clients no longer using `dotcom.ts`
to hard-code Cody Pro LLM models.)

## What does this PR actually _do_?

1. It updates the code in `cmd/cody-gateway-config` so that it will
produce a new "supported-models.json" file.
2. I then ran the tool manually, the output of which was then written to
`internal/modelconfig/embedded/models.json`.
3. That's it.

For any Sourcegraph releases after this PR gets merged, the "Sourcegraph
supplied LLM models" will be the newer set defined in `models.json`.
(i.e. having these new defaults, and including
"fireworks::v1::starcoder".)

## Test plan

~~I tested things locally, and unfortunately it doesn't look like any
clients are filtering based on the model capabilities. So "StarCoder" is
showing up in the Cody Web UI, despite failing at runtime.~~

Update: This was a problem on my end. This isn't an issue.


## Changelog

NA?
2024-08-06 10:26:56 -07:00
..
embedded Update the default Sourcegraph-supplied LLM models (#64281) 2024-08-06 10:26:56 -07:00
types Remove references to modelconfig.sourcegraph.pollingInterval (#63956) 2024-07-29 23:20:24 +00:00
BUILD.bazel Relax modelconfig name restrictions (#64161) 2024-07-30 15:20:22 -07:00
updates_test.go self hosted models (#63899) 2024-07-19 01:34:02 +00:00
updates.go feat/cody: Refactor completions API to use new modelconfig (support more models) (#63797) 2024-07-12 12:15:31 -07:00
util_test.go Relax modelconfig name restrictions (#64161) 2024-07-30 15:20:22 -07:00
util.go Relax modelconfig name restrictions (#64161) 2024-07-30 15:20:22 -07:00
validation_test.go Don't block frontend initialization with invalid modelconfig (#64200) 2024-08-01 15:56:23 -07:00
validation.go Update the default Sourcegraph-supplied LLM models (#64281) 2024-08-06 10:26:56 -07:00