fix: Correct OpenCode dynamic models API endpoint URL

The fetchOpencodeModels function was calling '/api/opencode/models' which
returns 404. Changed to '/api/setup/opencode/models' which correctly
returns the dynamic models.

This fixes an issue where enabled OpenCode dynamic models (e.g., local
Ollama models) were not appearing in the Model Defaults dropdown selectors
despite being visible and enabled in the OpenCode Settings page.
This commit is contained in:
Ken Lopez
2026-01-27 03:06:28 -05:00
parent cf35ca8650
commit d379bf412a

View File

@@ -2512,7 +2512,7 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
authMethod?: string;
}>;
error?: string;
}>('/api/opencode/models');
}>('/api/setup/opencode/models');
if (data.success && data.models) {
// Filter out Bedrock models