Merge pull request #9 from gnanam1990/feat/ollama-provider

fix: resolve frozen terminal for OpenAI/3P provider users (#3)
This commit is contained in:
Kevin Codex
2026-04-01 18:48:37 +08:00
committed by GitHub
2 changed files with 36 additions and 20 deletions

View File

@@ -193,6 +193,11 @@ export function getRuntimeMainLoopModel(params: {
* @returns The default model setting to use
*/
export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias {
// OpenAI provider: always use the configured OpenAI model
if (getAPIProvider() === 'openai') {
return process.env.OPENAI_MODEL || 'gpt-4o'
}
// Ants default to defaultModel from flag config, or Opus 1M if not configured
if (process.env.USER_TYPE === 'ant') {
return (
@@ -364,6 +369,10 @@ export function renderModelSetting(setting: ModelName | ModelAlias): string {
* if the model is not recognized as a public model.
*/
export function getPublicModelDisplayName(model: ModelName): string | null {
// For OpenAI provider, show the actual model name (e.g. 'gpt-4o') not a Claude alias
if (getAPIProvider() === 'openai') {
return null
}
switch (model) {
case getModelStrings().opus46:
return 'Opus 4.6'