This repository was archived by the owner on Sep 30, 2024. It is now read-only.
site config: minor fixes, make modelConfiguration enable new backend models API, initial self-hosted model config#63697
Merged
Merged
Conversation
added 4 commits
July 8, 2024 14:39
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
jamesmcnamara
approved these changes
Jul 8, 2024
jamesmcnamara
left a comment
Contributor
There was a problem hiding this comment.
The configuration detailed here is from a site admin perspective right? It doesn't impact the format of the API message sent to the Cody client
Member
Author
Correct |
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
In JSON schema, there may be `"type": "object",` where the type is a single string, but there may also be e.g. `"type": ["object", "null"],` where it may be multiple types. Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
Member
Author
|
Merging to unblock myself, will follow up on any thoughts you have after the fact @chrsmith |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These commits do a few things:
46b1303e62ea7e01ba6a441cc55bbe4c166ef5ce corrects a few minor mistakes with the new site config which I introduced in #63654 - namely fixing
examplesentries and nullability in a few cases. Nothing controversial here, just bug fixes.750b61e7dfa661338c9b40042087aed8e795f900 makes it so that the
/.api/client-configendpoint returns"modelsAPIEnabled": true,if"modelConfiguration"is set in the site config. For context,"modelConfiguration"is a new site config field, which is not used anywhere before this PR, and has this description:I will send a change to the client logic next so that it uses this
modelsAPIEnabledfield instead of the client-side feature flagdev.useServerDefinedModels.Finally, f52fba342dd2e62a606b885802f7f6bc37f4f4ac and bde67d57c39f4566dc9287f8793cb5ffd25955b3 make a few site config changes that @chrsmith and I discussed to enable Self-hosted models support. Specifically, it makes it possible to specify the following configuration in the site config:
Currently this site config is not actually used, so configuring Sourcegraph like this should not be done today, but this will be in a future PR by me.
@chrsmith one divergence from what we discussed.. me and you had planned to support this:
However, being able to specify
"useRecommendSettings": true,inside of aModelOverridein the site configuration means that all otherModelOverridefields (the ones we are accepting as recommended settings) must be optional, which seems quite bad and opens up a number of misconfiguration possibilities.Instead, I opted to introduce a new top-level field for model overrides with recommended settings, so the above becomes this instead:
This has the added benefit of making it impossible to set both
"useRecommendSettings": true,and other fields.I will make it a site config error (prevents admins from saving configuration) to specify the same model in both
modelOverridesandmodelOverridesRecommendedSettingsin a future PR.Test plan
Doesn't affect users yet. Careful review.
Changelog
N/A