Skip to content

feat: openai model loading & selection - #8

Merged
001Sarper merged 1 commit into
devfrom
feat/ai-model-selection
Aug 2, 2026
Merged

feat: openai model loading & selection#8
001Sarper merged 1 commit into
devfrom
feat/ai-model-selection

Conversation

@001Sarper

Copy link
Copy Markdown
Owner

Previously the code was hard coded to use gpt-5.6-luna for the summaries and chat with the AI Bot. With this feature update every AI model is loaded into the combo box and the user can freely select which model he wants to use.
This helps the user to fine tune his summaries quality or save up more money by using a cheaper model.

The default model is still gpt-5.6-luna when the settings file is created.

Closes #6

@001Sarper
001Sarper requested a review from Copilot August 2, 2026 10:54
@001Sarper 001Sarper added the enhancement New feature or request label Aug 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds user-selectable OpenAI model support by persisting a chosen model in settings and using it when creating the chat client, aligning with Issue #6’s request to control summary quality/cost.

Changes:

  • Add an AI model combobox (plus loading indicator) to Settings UI and load models from OpenAI.
  • Persist the selected model in settings/config and use it when initializing the ChatClient.
  • Set a default model (gpt-5.6-luna) when creating a new settings file.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Views/SettingsView.axaml Adds model selection UI (ComboBox + ProgressBar) to the settings page.
ViewModels/SettingsViewModel.cs Loads available models asynchronously and saves the selected model to settings.
Program.cs Ensures new settings files include default AiModel.
Models/Services/SettingsService.cs Adds AiModel to settings load/save flow.
Models/Services/AIService.cs Uses selected model for ChatClient and adds API call to fetch model list.
Models/Configuration/ClientSettings.cs Extends persisted settings schema with AiModel.
Suppressed comments (1)

ViewModels/SettingsViewModel.cs:46

  • DraftAiModel wird in LoadSettings() nicht initialisiert. Wenn der Nutzer speichert, bevor LoadModelsAsync() fertig ist, wird Settings.AiModel als null/leer gespeichert. Initialisiere das Draft-Feld direkt zusammen mit den übrigen Settings.
        DraftOpenaiKey = Settings.OpenaiKey;
        DraftProfileName = Settings.ProfileName;
        DraftProfileMail = Settings.ProfileMail;


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +101 to +106
catch (Exception e)
{
Console.WriteLine(e.Message);
collection.Add("Modelle konten nicht geladen werden");
return collection;
}
Comment on lines 62 to 66
OpenaiKey = (string.IsNullOrEmpty(s.OpenaiKey)) ? "" : App.Instance.Protector.Unprotect(s.OpenaiKey);
ProfileName = s.ProfileName;
ProfileMail = s.ProfileMail;
AiModel = s.AiModel;

Comment on lines 8 to 10
public string ProfileMail { get; set; }
public string AiModel { get; set; }

@001Sarper
001Sarper merged commit 4e235c8 into dev Aug 2, 2026
1 check passed
@001Sarper
001Sarper deleted the feat/ai-model-selection branch August 2, 2026 10:57
001Sarper added a commit that referenced this pull request Aug 3, 2026
* feat: OpenAI Key encryption in config file (#7)

* feat: openai model loading & selection (#6) (#8)

* feat: loading bar is shown when user creates learnsheet (#10)

* feat: Multi Language Support (#13)

* feat: add localization scaffolding (DE/EN JSON Files)

Not yet wired into views — follow-up commits pending.

* feat: - english & german language officially supported
      - real time switch between languages in settings
      - new languages can be easily imported by creating a new language config file & editing the language converters

* fix: - file picker multi-language support

* fix: - multi-language support implemented into model loading error
     - DataProtection aliases adjusted

* fix: - updated README.md with new pics & details
     - language fixed at pdf page counter
     - set default language to english
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants