Skip to content

feat: Add configurable OpenAI model name support#18

Open
nmhjklnm wants to merge 1 commit into
mazdak:masterfrom
nmhjklnm:feature/configurable-openai-model
Open

feat: Add configurable OpenAI model name support#18
nmhjklnm wants to merge 1 commit into
mazdak:masterfrom
nmhjklnm:feature/configurable-openai-model

Conversation

@nmhjklnm
Copy link
Copy Markdown

Summary

This PR adds the ability to configure the OpenAI model used for transcription, instead of the hardcoded whisper-1. Users can now specify custom models like gpt-4o-transcribe or gpt-4o-audio-preview through the settings UI.

Motivation

  • OpenAI has released newer audio models beyond whisper-1
  • Users with custom API proxies may want to use different model names
  • The hardcoded model name prevented flexibility without code changes

Changes

UI Changes

  • Added "OpenAI Model" input field in Advanced Settings section
  • Field defaults to whisper-1 for backward compatibility

Code Changes

  • Added @AppStorage("openAIModel") in DashboardProvidersView.swift
  • Modified SpeechToTextService.swift to read model name from UserDefaults
  • Maintains backward compatibility by defaulting to whisper-1 if not set

Testing

Tested with:

  • Default behavior (whisper-1)
  • Custom model name (gpt-4o-transcribe)
  • Empty/whitespace handling (falls back to default)

Screenshots

The new "OpenAI Model" field appears in Advanced Settings below the OpenAI base URL field.

Backward Compatibility

✅ Fully backward compatible - existing users will continue using whisper-1 by default.

Allow users to customize the OpenAI model used for transcription
(e.g., gpt-4o-transcribe, gpt-4o-audio-preview) instead of the
hardcoded whisper-1.

Changes:
- Add openAIModel setting in DashboardProvidersView (default: whisper-1)
- Add model name input field in Advanced Settings UI
- Update SpeechToTextService to use configured model from UserDefaults
- Maintain backward compatibility with whisper-1 as default

This enables users to leverage newer OpenAI audio models through
custom API proxies or direct OpenAI API access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant