Skip to content

Commit

Permalink
feat(enterprise): allow multiple models for enterprise customers (#4780)
Browse files Browse the repository at this point in the history
Co-authored-by: Beatrix <[email protected]>
Co-authored-by: Beatrix <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2024
1 parent 61d93d6 commit dc9ea0b
Show file tree
Hide file tree
Showing 48 changed files with 1,885 additions and 1,444 deletions.
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 gateway = "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, 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

0 comments on commit dc9ea0b

Please sign in to comment.