Skip to content

Commit f99f369

Browse files
committed
fix(openAi): GPT4o-mini is missing from OpenAI model list
When deserializing existing OpenAiClientSharedState new model IDs from enum are not added. Closes #214
1 parent 33f9ebc commit f99f369

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
- GPT4o-mini is missing from OpenAI model list.
8+
59
## [2.1.0] - 2024-07-19
610

711
### Added

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/clients/openAi/OpenAiClientSharedState.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.github.blarc.ai.commits.intellij.plugin.settings.clients.openAi
22

33
import com.github.blarc.ai.commits.intellij.plugin.settings.clients.LLMClientSharedState
44
import com.intellij.openapi.components.*
5-
import com.intellij.util.xmlb.XmlSerializerUtil
65
import com.intellij.util.xmlb.annotations.XCollection
76
import dev.langchain4j.model.openai.OpenAiChatModelName
87

@@ -27,6 +26,8 @@ class OpenAiClientSharedState : PersistentStateComponent<OpenAiClientSharedState
2726
override fun getState(): OpenAiClientSharedState = this
2827

2928
override fun loadState(state: OpenAiClientSharedState) {
30-
XmlSerializerUtil.copyBean(state, this)
29+
// Add all model IDs from enum in case they are not stored in xml
30+
modelIds += state.modelIds
31+
hosts += state.hosts
3132
}
3233
}

0 commit comments

Comments
 (0)