Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(enterprise): allow multiple models for enterprise customers #4780

Merged
merged 45 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e7a420b
WIP
jamesmcnamara Jul 3, 2024
e5bf7d8
refactor: add model tags and remove deprecated models
abeatrix Jul 3, 2024
0f50258
remove codyProOnly and uiGroup
abeatrix Jul 3, 2024
e412283
Update bindings
abeatrix Jul 3, 2024
a7c02d5
Update bindings
abeatrix Jul 3, 2024
3741398
Merge branch 'bee/tags-model' into jsm/cody-enterprise-models
jamesmcnamara Jul 3, 2024
0580d74
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 3, 2024
ee4ba56
removed getModel and setModel
jamesmcnamara Jul 4, 2024
52e954e
spring cleaning
jamesmcnamara Jul 4, 2024
0a4076c
spring cleaning pt. ii
jamesmcnamara Jul 4, 2024
4e0179f
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 4, 2024
b59d717
fixed some tests
jamesmcnamara Jul 4, 2024
34d53ba
fixes for tests
jamesmcnamara Jul 5, 2024
3333b8d
fixed type error
jamesmcnamara Jul 5, 2024
db80ff8
fixed type error
jamesmcnamara Jul 5, 2024
3e26028
Merge branch 'jsm/cody-enterprise-models' of github.com:sourcegraph/c…
jamesmcnamara Jul 5, 2024
bd7d289
removed console
jamesmcnamara Jul 5, 2024
028eac7
refactor: add utility functions to identify model types
abeatrix Jul 5, 2024
ff5cbbe
Reverted missing file
jamesmcnamara Jul 7, 2024
3a49cad
Merge branch 'bee/cody-enterprise-models' of github.com:sourcegraph/c…
jamesmcnamara Jul 8, 2024
81099b3
updated recordings
jamesmcnamara Jul 8, 2024
b2ecc25
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 8, 2024
7a9c556
updated recordings
jamesmcnamara Jul 8, 2024
e89f8cd
added free model
jamesmcnamara Jul 8, 2024
8ecbb10
ModelsService only accepts a valid model as default
jamesmcnamara Jul 8, 2024
caaa209
Added an e2e test for enterprise model selection
jamesmcnamara Jul 8, 2024
0679437
added unit tests for ModelsService.setDefaultModel
jamesmcnamara Jul 9, 2024
0ff7798
Merge branch 'main' into jsm/cody-enterprise-models
abeatrix Jul 9, 2024
702551b
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 9, 2024
d19007b
Update lib/shared/src/models/dotcom.ts
jamesmcnamara Jul 10, 2024
65db69b
Apply suggestions from code review
jamesmcnamara Jul 10, 2024
2aebb13
regenerated and fixed type errors
jamesmcnamara Jul 10, 2024
dbd57ca
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 10, 2024
0cbffb1
updated recording
jamesmcnamara Jul 10, 2024
fad1402
switched e2e tests to use new server-sent models config
jamesmcnamara Jul 10, 2024
b8a3862
Removed stub models and updated changelog
jamesmcnamara Jul 10, 2024
f5b3fb4
review comments
jamesmcnamara Jul 10, 2024
c28cbc1
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 12, 2024
c71f385
test(e2e): refactor command-core test to use focusSidebar helper func…
jamesmcnamara Jul 12, 2024
98fbd94
fixed type error
jamesmcnamara Jul 12, 2024
bec077f
only set default model if the user took an action
jamesmcnamara Jul 12, 2024
82dd424
Merge branch 'main' of github.com:sourcegraph/cody into jsm/cody-ente…
jamesmcnamara Jul 12, 2024
d7be1fa
fixed callsite
jamesmcnamara Jul 12, 2024
b85268d
swapped ordering of setting default models
jamesmcnamara Jul 12, 2024
47cd1fe
added comment
jamesmcnamara Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ index.scip
playwright
playwright-report
test-results
.vscode-test/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport")
package com.sourcegraph.cody.protocol_generated;

data class ClientSideConfigParams(
val apiKey: String? = null,
val apiEndpoint: String? = null,
)

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ object Constants {
const val remote = "remote"
const val auto = "auto"
const val manual = "manual"
const val accuracy = "accuracy"
const val speed = "speed"
const val balanced = "balanced"
const val recommended = "recommended"
const val deprecated = "deprecated"
const val experimental = "experimental"
const val pro = "pro"
const val free = "free"
const val enterprise = "enterprise"
const val `cody-gateway` = "cody-gateway"
const val byok = "byok"
const val ollama = "ollama"
const val dev = "dev"
const val edit = "edit"
const val user = "user"
const val editor = "editor"
const val initial = "initial"
Expand Down Expand Up @@ -104,7 +118,6 @@ object Constants {
const val `get-chat-models` = "get-chat-models"
const val openFile = "openFile"
const val openLocalFileWithRange = "openLocalFileWithRange"
const val edit = "edit"
const val `context_get-remote-search-repos` = "context/get-remote-search-repos"
const val `context_choose-remote-search-repo` = "context/choose-remote-search-repo"
const val `context_remove-remote-search-repo` = "context/remove-remote-search-repo"
Expand Down Expand Up @@ -140,7 +153,6 @@ object Constants {
const val Invoke = "Invoke"
const val workspace = "workspace"
const val default = "default"
const val experimental = "experimental"
const val `recently used` = "recently used"
const val ask = "ask"
const val none = "none"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport")
package com.sourcegraph.cody.protocol_generated;

data class ContextParams(
val user: Int? = null,
)

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
package com.sourcegraph.cody.protocol_generated;

data class Model(
val default: Boolean,
val codyProOnly: Boolean,
val model: String,
val usage: List<ModelUsage>,
val contextWindow: ModelContextWindow,
val clientSideConfig: ClientSideConfigParams? = null,
val provider: String,
val title: String,
val deprecated: Boolean,
val tags: List<ModelTag>,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport")
package com.sourcegraph.cody.protocol_generated;

data class ModelContextWindow(
val input: Int,
val output: Int,
val context: ContextParams? = null,
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport")
package com.sourcegraph.cody.protocol_generated;

typealias ModelTag = String // One of: accuracy, speed, balanced, recommended, deprecated, experimental, pro, free, enterprise, cody-gateway, byok, local, ollama, dev

59 changes: 33 additions & 26 deletions agent/recordings/cody-chat_103640681/recording.har.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading