Skip to content

feat(ollama): Enable model listing - #319

Merged
njbrake merged 1 commit into
mainfrom
307-ollama-add-support-for-calling-list_models
Aug 20, 2025
Merged

njbrake merged 1 commit into
mainfrom
307-ollama-add-support-for-calling-list_models

Conversation

@njbrake

@njbrake njbrake commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor

Description

Added list_models method to OllamaProvider for fetching available models.

PR Type

🆕 New Feature ## Relevant issues

Checklist

  • I have added unit tests that prove my fix/feature works
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines```

- Added `list_models` method to `OllamaProvider` for fetching available models.
- Updated `SUPPORTS_LIST_MODELS` flag to `True`.
- Introduced `_convert_models_list` utility to format model data from the API response.
- Imported necessary types for model handling.
@njbrake njbrake linked an issue Aug 20, 2025 that may be closed by this pull request
@codecov

codecov Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/any_llm/providers/ollama/ollama.py 57.14% 3 Missing ⚠️
src/any_llm/providers/ollama/utils.py 60.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/any_llm/providers/ollama/utils.py 15.21% <60.00%> (+2.57%) ⬆️
src/any_llm/providers/ollama/ollama.py 31.73% <57.14%> (+0.41%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njbrake
njbrake merged commit 1b7c219 into main Aug 20, 2025
@njbrake
njbrake deleted the 307-ollama-add-support-for-calling-list_models branch August 20, 2025 17:10
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.

ollama add support for calling list_models

1 participant