# הצגת מודלי ההחלטות הזמינים

**API:** Model API

**Endpoint:** `GET /api/v1/decisions/models`

מחזיר רק מודלים שה-model_kind האפקטיבי שלהם הוא decisions. מיפוי ספק מופעל עשוי לעקוף את קטגוריית הבסיס של המודל; ללא סינון provider, עדיפות המיפוי בסדר יורד ושם הספק בסדר עולה קובעים את העקיפה. אם אין מיפוי מופעל שמספק קטגוריה, משתמשים בקטגוריית הבסיס (chat כשהיא חסרה). משתמש באותה נראות, תמחור עדכני, סינון provider וסדר יציב כמו GET /api/v1/models. תוצאה ריקה מחזירה HTTP 200 עם object=list ו-data=[]. זו קריאת קטלוג מקומית: היא אינה מסנכרנת מודלים חיצוניים ואינה מחייבת עבור קריאת מודל. הפרטים נשארים זמינים דרך GET /api/v1/models/{model_id}. נקודת הקצה הכללית GET /api/v1/models ממשיכה לכלול את כל הקטגוריות.

## Base URL

- `https://openapi.felo.ai` — פרודקשן

## Authentication

- `FeloBearerAuth` (http bearer) — מפתח API של Felo נשלח בכותרת `Authorization: Bearer <key>`.
- `FeloApiKey` (apiKey in header `X-API-Key`) — מפתח API של Felo נשלח בכותרת `X-API-Key: <key>`.

## Responses

### 200 — מודלים זמינים

**application/json**

Schema: `ModelList` (`#/components/schemas/ModelList`)

Example:

```json
{
  "object": "list",
  "data": [
    {
      "id": "jev-1.13",
      "object": "model",
      "created": 1788220800,
      "owned_by": "Felo Router",
      "model_kind": "decisions"
    }
  ]
}
```

### 401 — מפתח API של Felo לא חוקי או חסר

**application/json**

Schema: `OpenAIErrorResponse` (`#/components/schemas/OpenAIErrorResponse`)

### 422 — פרמטר שאילתה לא חוקי, כגון provider ריק

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    }
  }
}
```

### 503 — קטלוג המודלים אינו זמין באופן זמני

**application/json**

Schema: `OpenAIErrorResponse` (`#/components/schemas/OpenAIErrorResponse`)

## Schema definitions

### Model

`#/components/schemas/Model`

```json
{
  "type": "object",
  "required": [
    "id",
    "object",
    "created",
    "owned_by"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "מזהה המודל ב-Felo."
    },
    "object": {
      "type": "string",
      "const": "model"
    },
    "created": {
      "type": "integer",
      "format": "int64",
      "description": "חותמת הזמן של יצירת קטלוג המודלים בשניות יוניקס."
    },
    "owned_by": {
      "type": "string"
    },
    "model_kind": {
      "type": "string",
      "description": "קטגוריית היכולת האפקטיבית של המודל לאחר עקיפות של מיפוי ספק מופעל: chat, image_generation, video_generation או decisions. השתמשו בנקודת הקצה לקריאה שמתאימה לקטגוריה הזו."
    }
  },
  "additionalProperties": true
}
```

### ModelList

`#/components/schemas/ModelList`

```json
{
  "type": "object",
  "required": [
    "object",
    "data"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "list"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Model"
      }
    }
  },
  "additionalProperties": true
}
```

### OpenAIErrorResponse

`#/components/schemas/OpenAIErrorResponse`

```json
{
  "type": "object",
  "description": "מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "סוג שגיאה תואם OpenAI כשמסופק."
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
```
