Skip to content

add model selection backend support#167

Open
chinmaychahar wants to merge 3 commits into
AcademySoftwareFoundation:mainfrom
chinmaychahar:feat/model-selection-backend
Open

add model selection backend support#167
chinmaychahar wants to merge 3 commits into
AcademySoftwareFoundation:mainfrom
chinmaychahar:feat/model-selection-backend

Conversation

@chinmaychahar

Copy link
Copy Markdown

Summary

Add backend support for user-selectable LLM models (Issue - #87).

  • Dynamic model discovery via GET /models endpoint
  • Optional model field on POST /generate-note to override the server default
  • preferred_model persisted in user settings (MongoDB)
  • Graceful fallback to server default when provider API is unreachable

Testing

  • I have tested these changes locally
  • I have run all relevant automated tests
  • I have verified this does not break existing workflows
  • For changes that can be tested in UI, I have included screenshots or gif animations of the changes.

How I Tested

  • I ran make test and all backend tests pass
  • Added new test file backend/tests/llm_providers/test_model_selection.py
  • Verified GET /models endpoint returns expected shape via test client
  • Verified preferred_model field persists and returns correctly in user settings endpoints

Signed-off-by: chinmaychahar <chinmay.cc.06@gmail.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 20, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: chinmaychahar / name: chinmaychahar (2864580)

Comment thread backend/src/dna/llm_providers/gemini_provider.py Outdated
@jspada200

Copy link
Copy Markdown
Collaborator

Great start @chinmaychahar ! I approved the pipeline to run. Let me know if you have any issues with the automated pipelines.

@chinmaychahar

Copy link
Copy Markdown
Author

Thanks! I'll take a look at the failing tests

@chinmaychahar

Copy link
Copy Markdown
Author

I removed the server-side caching, made sens that the frontend query cache handles that already, let me know if anything else needs changing

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.

2 participants