rapidmlx

package
v0.10.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package rapidmlx wraps the OpenAI-compatible HTTP surface exposed by Rapid-MLX (https://github.com/raullenchai/Rapid-MLX). It is a concrete provider type distinct from vLLM so the service layer can keep provider identity separate from utilization probing, which Rapid-MLX exposes on a different observability endpoint family.

Index

Constants

View Source
const DefaultBaseURL = "http://localhost:8000/v1"

Variables

View Source
var ProtocolCapabilities = openai.OpenAIProtocolCapabilities

ProtocolCapabilities keeps Rapid-MLX on the standard OpenAI-compatible surface. The provider remains distinct from vLLM at the type level.

Functions

func New

func New(cfg Config) *openai.Provider

Types

type Config

type Config struct {
	BaseURL      string
	APIKey       string
	Model        string
	ModelPattern string
	KnownModels  map[string]string
	Headers      map[string]string
	Reasoning    reasoning.Reasoning
}

type UtilizationProbe

type UtilizationProbe struct {
	// contains filtered or unexported fields
}

UtilizationProbe queries Rapid-MLX status endpoints and normalizes them into the shared endpoint utilization shape.

func NewUtilizationProbe

func NewUtilizationProbe(baseURL string, client *http.Client) *UtilizationProbe

NewUtilizationProbe creates a probe for an OpenAI-compatible Rapid-MLX base URL.

func (*UtilizationProbe) Probe

Probe fetches /v1/status from the OpenAI-compatible base URL and returns a normalized sample. Failures return stale or unknown utilization instead of surfacing endpoint unavailability.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL