mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-07-10 01:39:13 +00:00
feat: new mercury edit 2 model
This commit is contained in:
parent
8bda2ec8b4
commit
f492af35cb
8 changed files with 23 additions and 23 deletions
|
|
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Configurable subagent runtimes with per-subagent model selection and ACP-specific runtime options
|
||||
- Diagnostics tool call rendering in the agent UI
|
||||
- Custom OpenAI Responses API support with configurable context window and output size
|
||||
- New Mercury Edit 2 Model
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ object LegacySettingsMigration {
|
|||
setModelSelection(FeatureType.CODE_COMPLETION, codeModel, selectedService)
|
||||
|
||||
val nextEditModel = if (selectedService == ServiceType.PROXYAI) {
|
||||
ModelCatalog.MERCURY_CODER
|
||||
ModelCatalog.MERCURY_EDIT2
|
||||
} else {
|
||||
resolveAvailableModel(
|
||||
serviceType = selectedService,
|
||||
|
|
@ -190,7 +190,7 @@ object LegacySettingsMigration {
|
|||
serviceType = serviceType,
|
||||
featureType = FeatureType.CODE_COMPLETION,
|
||||
preferredModel = service<CodeGPTServiceSettings>().state.codeCompletionSettings.model,
|
||||
fallbackModel = ModelCatalog.MERCURY_CODER
|
||||
fallbackModel = ModelCatalog.MERCURY_EDIT2
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ object LegacySettingsMigration {
|
|||
resolveAvailableModel(
|
||||
serviceType = serviceType,
|
||||
featureType = FeatureType.CODE_COMPLETION,
|
||||
fallbackModel = ModelCatalog.MERCURY_CODER
|
||||
fallbackModel = ModelCatalog.MERCURY_EDIT2
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ class ModelCatalog {
|
|||
private val defaultModelRefs = mapOf(
|
||||
FeatureType.AGENT to DefaultModelRef(ServiceType.PROXYAI, PROXYAI_AUTO),
|
||||
FeatureType.CHAT to DefaultModelRef(ServiceType.PROXYAI, PROXYAI_AUTO),
|
||||
FeatureType.AUTO_APPLY to DefaultModelRef(ServiceType.PROXYAI, MERCURY_CODER),
|
||||
FeatureType.AUTO_APPLY to DefaultModelRef(ServiceType.PROXYAI, MERCURY_EDIT2),
|
||||
FeatureType.COMMIT_MESSAGE to DefaultModelRef(ServiceType.PROXYAI, Haiku_4_5.id),
|
||||
FeatureType.INLINE_EDIT to DefaultModelRef(ServiceType.PROXYAI, Haiku_4_5.id),
|
||||
FeatureType.LOOKUP to DefaultModelRef(ServiceType.PROXYAI, Haiku_4_5.id),
|
||||
FeatureType.CODE_COMPLETION to DefaultModelRef(ServiceType.PROXYAI, MERCURY_CODER),
|
||||
FeatureType.NEXT_EDIT to DefaultModelRef(ServiceType.PROXYAI, MERCURY_CODER),
|
||||
FeatureType.CODE_COMPLETION to DefaultModelRef(ServiceType.PROXYAI, MERCURY_EDIT2),
|
||||
FeatureType.NEXT_EDIT to DefaultModelRef(ServiceType.PROXYAI, MERCURY_EDIT2),
|
||||
)
|
||||
|
||||
fun getAllModelsForFeature(featureType: FeatureType): List<ModelSelection> {
|
||||
|
|
@ -106,6 +106,6 @@ class ModelCatalog {
|
|||
const val LLAMA_3_2 = "llama3.2"
|
||||
|
||||
const val MERCURY2 = "mercury-2"
|
||||
const val MERCURY_CODER = "mercury-edit-2"
|
||||
const val MERCURY_EDIT2 = "mercury-edit-2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import ee.carlrobert.codegpt.agent.clients.InceptionAILLMClient
|
|||
import ee.carlrobert.codegpt.agent.clients.ProxyAILLMClient
|
||||
import ee.carlrobert.codegpt.completions.llama.LlamaModel
|
||||
import ee.carlrobert.codegpt.settings.models.ModelCatalog.Companion.MERCURY2
|
||||
import ee.carlrobert.codegpt.settings.models.ModelCatalog.Companion.MERCURY_CODER
|
||||
import ee.carlrobert.codegpt.settings.models.ModelCatalog.Companion.MERCURY_EDIT2
|
||||
import ee.carlrobert.codegpt.settings.service.FeatureType
|
||||
import ee.carlrobert.codegpt.settings.service.ServiceType
|
||||
import ee.carlrobert.codegpt.settings.service.custom.DEFAULT_CUSTOM_OPENAI_MAX_OUTPUT_TOKENS
|
||||
|
|
@ -189,8 +189,7 @@ private fun defaultModelDisplayName(modelId: String): String {
|
|||
|
||||
// Inception
|
||||
Mercury2.id, MERCURY2 -> "Mercury 2"
|
||||
MERCURY_CODER -> "Mercury Coder 2"
|
||||
LEGACY_MERCURY_CODER -> "Mercury Coder"
|
||||
MERCURY_EDIT2 -> "Mercury Edit 2"
|
||||
|
||||
else -> modelId
|
||||
}
|
||||
|
|
@ -384,15 +383,15 @@ private class ProxyAIModelProvider : ModelProvider {
|
|||
)
|
||||
|
||||
FeatureType.AUTO_APPLY -> listOf(
|
||||
defaultModel(MERCURY_CODER, Icons.Inception),
|
||||
defaultModel(MERCURY_EDIT2, Icons.Inception),
|
||||
)
|
||||
|
||||
FeatureType.CODE_COMPLETION -> listOf(
|
||||
defaultModel(MERCURY_CODER, Icons.Inception)
|
||||
defaultModel(MERCURY_EDIT2, Icons.Inception)
|
||||
)
|
||||
|
||||
FeatureType.NEXT_EDIT -> listOf(
|
||||
defaultModel(MERCURY_CODER)
|
||||
defaultModel(MERCURY_EDIT2)
|
||||
)
|
||||
|
||||
else -> emptyList()
|
||||
|
|
@ -628,10 +627,10 @@ private class InceptionModelProvider : ModelProvider {
|
|||
provider = serviceType,
|
||||
llmModel = virtualModel(
|
||||
InceptionAILLMClient.Inception,
|
||||
MERCURY_CODER,
|
||||
MERCURY_EDIT2,
|
||||
OPENAI_CAPABILITIES
|
||||
),
|
||||
displayName = defaultModelDisplayName(MERCURY_CODER),
|
||||
displayName = defaultModelDisplayName(MERCURY_EDIT2),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,8 +228,8 @@ class ModelSettings : SimplePersistentStateComponent<ModelSettingsState>(ModelSe
|
|||
private fun migrateProxyAIModels() {
|
||||
listOf(FeatureType.AUTO_APPLY, FeatureType.CODE_COMPLETION, FeatureType.NEXT_EDIT).forEach {
|
||||
val modelSelection = state.getModelSelection(it)
|
||||
if (modelSelection?.provider == PROXYAI && modelSelection.model != ModelCatalog.MERCURY_CODER) {
|
||||
setModelWithProvider(it, ModelCatalog.MERCURY_CODER, PROXYAI)
|
||||
if (modelSelection?.provider == PROXYAI && modelSelection.model != ModelCatalog.MERCURY_EDIT2) {
|
||||
setModelWithProvider(it, ModelCatalog.MERCURY_EDIT2, PROXYAI)
|
||||
}
|
||||
}
|
||||
listOf(
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@ class CodeGPTServiceChatCompletionSettingsState : BaseState() {
|
|||
|
||||
class CodeGPTServiceCodeCompletionSettingsState : BaseState() {
|
||||
var codeCompletionsEnabled by property(true)
|
||||
var model by string(ModelCatalog.MERCURY_CODER)
|
||||
var model by string(ModelCatalog.MERCURY_EDIT2)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,13 +227,13 @@ class ModelSettingsTest : IntegrationTest() {
|
|||
|
||||
modelSettings.setModelWithProvider(
|
||||
FeatureType.NEXT_EDIT,
|
||||
ModelCatalog.MERCURY_CODER,
|
||||
ModelCatalog.MERCURY_EDIT2,
|
||||
ServiceType.PROXYAI
|
||||
)
|
||||
|
||||
val notification = lastNotification.get()
|
||||
assertThat(notification!!.featureType).isEqualTo(FeatureType.NEXT_EDIT)
|
||||
assertThat(notification.model).isEqualTo(ModelCatalog.MERCURY_CODER)
|
||||
assertThat(notification.model).isEqualTo(ModelCatalog.MERCURY_EDIT2)
|
||||
assertThat(notification.serviceType).isEqualTo(ServiceType.PROXYAI)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ interface ShortcutsTestMixin {
|
|||
modelSettings.setModel(FeatureType.CHAT, "gpt-5-mini", ServiceType.PROXYAI)
|
||||
modelSettings.setModel(
|
||||
FeatureType.CODE_COMPLETION,
|
||||
ModelCatalog.MERCURY_CODER,
|
||||
ModelCatalog.MERCURY_EDIT2,
|
||||
ServiceType.PROXYAI
|
||||
)
|
||||
service<CodeGPTServiceSettings>().state.run {
|
||||
|
|
@ -185,7 +185,7 @@ interface ShortcutsTestMixin {
|
|||
FeatureType.CODE_COMPLETION -> {
|
||||
modelSettings.setModel(
|
||||
FeatureType.CODE_COMPLETION,
|
||||
ModelCatalog.MERCURY_CODER,
|
||||
ModelCatalog.MERCURY_EDIT2,
|
||||
ServiceType.INCEPTION
|
||||
)
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ interface ShortcutsTestMixin {
|
|||
modelSettings.setModel(role, ModelCatalog.MERCURY2, ServiceType.INCEPTION)
|
||||
modelSettings.setModel(
|
||||
FeatureType.CODE_COMPLETION,
|
||||
ModelCatalog.MERCURY_CODER,
|
||||
ModelCatalog.MERCURY_EDIT2,
|
||||
ServiceType.INCEPTION
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue