Skip to content

[cli] Rest API server in local foundry cli-preview-0.10.0 #774

@omiossec

Description

@omiossec

Problem

The documentation Foundry Local REST API Reference is outdated and none of the URI work.

Diagnostics

Looking at the webservice.cc file, there are a new set of URI

`
// Status
impl_->router->route("GET", "/status",
std::make_shared(ctx));

// Shutdown
impl_->router->route("POST", "/shutdown",
std::make_shared(impl_->shutdown_callback));

// Model management
impl_->router->route("GET", "/models/loaded", CreateListLoadedModelsHandler(ctx));
impl_->router->route("GET", "/models/load/{name}", CreateLoadModelHandler(ctx));
impl_->router->route("GET", "/models/unload/{name}", CreateUnloadModelHandler(ctx));

// OpenAI-compatible endpoints
impl_->router->route("GET", "/v1/models", CreateOpenAIListModelsHandler(ctx));
impl_->router->route("GET", "/v1/models/{name}", CreateOpenAIRetrieveModelHandler(ctx));
impl_->router->route("POST", "/v1/chat/completions", CreateChatCompletionsHandler(ctx));
impl_->router->route("POST", "/v1/audio/transcriptions", CreateAudioTranscriptionsHandler(ctx));
impl_->router->route("POST", "/v1/embeddings", CreateEmbeddingsHandler(ctx));
impl_->router->route("POST", "/v1/responses", CreateResponsesHandler(ctx));
impl_->router->route("GET", "/v1/responses", CreateListResponsesHandler(ctx));
impl_->router->route("GET", "/v1/responses/{id}", CreateGetResponseHandler(ctx));
impl_->router->route("DELETE", "/v1/responses/{id}", CreateDeleteResponseHandler(ctx));
impl_->router->route("GET", "/v1/responses/{id}/input_items", CreateGetInputItemsHandler(ctx));
`
Have you an updated documentation?

System

  • OS: Microsoft Windows 10.0.26200
  • Architecture: Arm64
  • CPU: Snapdragon(R) X - X126100 - Qualcomm(R) Oryon(TM) CPU (8 logical cores)
  • GPU: Qualcomm Incorporated Qualcomm(R) Adreno(TM) X1-45 GPU (—)
  • NPU: Qualcomm Technologies, Inc. Snapdragon(R) X - X126100 - Qualcomm(R) Hexagon(TM) NPU
  • RAM: 2.0 GB available / 15.6 GB total
  • Disk: 667.7 GB free / 933.0 GB total (C:)
  • .NET: .NET 9.0.16

Service

Models

  • Available variants: 47
  • Loaded: 0
  • Cached: 8

Connectivity

  • Local service: Reachable
  • Model registry: Reachable

Warnings

  • Qualcomm Adreno GPU detected. If acceleration fails, try a CPU model variant or update the GPU driver.

This is an auto-generated diagnostic report for the foundry-local-cli GitHub issue tracker, capturing your system specs, service status, and model cache
state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions