Skip to content

Model classification with database models #9

Description

@nebulon42

What happened?

Model discovery works but classification does not. The v1/models endpoint on my setup does not provide the mode attribute for my models. I'm not sure if it worked with older LiteLLM versions or if it works with config-defined models.

Expected behavior

Models with mode "embedding" should not show up in the OpenCode model picker.
It seems that v1/model/info provides the mode attribute.

Steps to reproduce

I have mistral-embed as part of my models in LiteLLM. All models are database defined. From the data and API testing v1/model/info correctly outputs mode: embedding for the mistral-embedding model.

v1/models gives:

...
{
      "id": "mistral/mistral-embed",
      "object": "model",
      "created": [redacted],
      "owned_by": "openai"
 }
...

v1/model/info gives:

...
    {
      "model_name": "mistral/mistral-embed",
      "litellm_params": {
        "custom_llm_provider": "mistral",
        "litellm_credential_name": "Mistral",
        "use_in_pass_through": false,
        "use_litellm_proxy": false,
        "merge_reasoning_content_in_choices": false,
        "model": "mistral/mistral-embed"
      },
      "model_info": {
        "id": [redacted],
        "db_model": true,
        "blocked": false,
        "mode": "embedding",
        "key": "mistral/mistral-embed",
        ...
      }
    }
...

Plugin version

0.5.0

LiteLLM version

1.89.2

OpenCode version

1.17.11

Node.js / Bun version & OS

node:24-bookworm-slim

Relevant logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions