Skip to content

Add ModelLister for Ollama, Anthropic, Mistral, OpenAI, Gemini#1587

Merged
gold-silver-copper merged 11 commits into0xPlaygrounds:mainfrom
LHelge:feat-rig-1075-list-model-providers
Apr 10, 2026
Merged

Add ModelLister for Ollama, Anthropic, Mistral, OpenAI, Gemini#1587
gold-silver-copper merged 11 commits into0xPlaygrounds:mainfrom
LHelge:feat-rig-1075-list-model-providers

Conversation

@LHelge
Copy link
Copy Markdown
Contributor

@LHelge LHelge commented Apr 1, 2026

Summary

Continued on the work from #1075 which introduced the primitives to access the API for listing models. I have implemented the ModelLister trait for the providers that I currently use in my project.

  • Ollama
  • Anthropic
  • Mistral
  • OpenAI

Usage

For the providers that has this implementation the list_models() function should be available on the Client

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let client = anthropic::Client::new("sk-ant-...").unwrap();
    let models = client.list_models().await?;
    println!("Available models: {models:#?}");

    Ok(())
}

Future work

Should be fairly straight forward to copy/paste or vibe the same solution for the remaining providers.

@gold-silver-copper
Copy link
Copy Markdown
Contributor

Added gemini support as well as tests.

@gold-silver-copper gold-silver-copper changed the title Add ModelLister for Ollama, Anthropic, Mistral and OpenAI Add ModelLister for Ollama, Anthropic, Mistral, OpenAI, Gemini Apr 10, 2026
@gold-silver-copper gold-silver-copper added this pull request to the merge queue Apr 10, 2026
Merged via the queue into 0xPlaygrounds:main with commit d2e2d89 Apr 10, 2026
6 checks passed
@github-actions github-actions bot mentioned this pull request Apr 9, 2026
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