Skip to content

GET /v1/models should list cached models from MACAFM_MLX_MODEL_CACHE #64

@scouzi1966

Description

@scouzi1966

Summary

GET /v1/models currently only returns the single model loaded via -m. It should also list models available in the MACAFM_MLX_MODEL_CACHE directory so clients can discover what's available without loading each model first.

Motivation

When integrating AFM with benchmark tools (e.g. ToolCall-15), clients need to discover available models programmatically. Currently, the only way to know what models are cached locally is to scan the filesystem directly.

Proposed behavior

  • Scan MACAFM_MLX_MODEL_CACHE for models--<org>--<name>/ subdirectories
  • Return them in the /v1/models response alongside the currently loaded model
  • Distinguish loaded vs available models (e.g. loaded: true vs loaded: false)
  • The loaded model should still appear first in the list

Context

Discovered while integrating AFM as a provider in ToolCall-15, a tool-calling benchmark dashboard. Model discovery would enable auto-populating the model selection UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions