Skip to content

fix: use model ID instead of name for selectedModel - #27

Merged
GoBeromsu merged 1 commit into
masterfrom
fix/model-selection-bug
Dec 28, 2025
Merged

fix: use model ID instead of name for selectedModel#27
GoBeromsu merged 1 commit into
masterfrom
fix/model-selection-bug

Conversation

@GoBeromsu

Copy link
Copy Markdown
Owner

Summary

  • Fix model selection storing config.name instead of config.id
  • This caused model toggle to not show as active after selection
  • This caused API 400 errors due to invalid model identifier being sent

Root Cause

In Api.ts line 132, selectedModel was set to config.name (display name like "GPT-4o") but all comparisons used config.id (API model ID like "gpt-4o").

Test plan

  • Select a model and verify the toggle shows as active
  • Run classification and verify no 400 error from API
  • Reload Obsidian and verify selected model persists

🤖 Generated with Claude Code

The model selection was storing config.name (display name) instead of
config.id (API model ID), causing:
- Model toggle not showing as active after selection
- API 400 errors due to invalid model identifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@GoBeromsu
GoBeromsu merged commit 829957e into master Dec 28, 2025
1 check passed
@GoBeromsu
GoBeromsu deleted the fix/model-selection-bug branch April 11, 2026 07:26
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