Zum Hauptinhalt springen

Documentation Index

Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt

Use this file to discover all available pages before exploring further.

Reasoning-Konfiguration

Sie können das Reasoning-Verhalten mit dem Parameter reasoning konfigurieren:
curl -X POST https://aihubmix.com/v1/responses \
  -H "Authorization: Bearer YOUR_AIHUBMIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "input": "Plan a week-long trip to the US for me.",
    "reasoning": {
      "effort": "high"
    },
    "max_output_tokens": 5000
  }'

Reasoning-Intensität

Der Parameter effort steuert, wie viele Rechenressourcen das Modell in das Reasoning investiert, und bestimmt im Wesentlichen den Grad des Reasoning-Aufwands.
Reasoning-StufeBeschreibung
minimalGrundlegendes Reasoning mit minimaler Berechnung
lowLeichtgewichtiges Reasoning, geeignet für einfache Fragen
mediumAusgewogenes Reasoning, geeignet für mittelschwere Probleme
highTiefgehendes Reasoning, geeignet für komplexe Probleme

Reasoning in Konversationen verwenden

Die Reasoning-Funktion kann auch in Mehrfachdialogen verwendet werden:
import requests

url = "https://aihubmix.com/v1/responses"

headers = {
    "Authorization": "Bearer YOUR_AIHUBMIX_API_KEY",
    "Content-Type": "application/json",
}

data = {
    "model": "kimi-k2.5",
    "input": [
        {
            "type": "message",
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "What is your favorite animal?",
                }
            ],
        },
        {
            "type": "message",
            "role": "assistant",
            "id": "msg_123",
            "status": "completed",
            "content": [
                {
                    "type": "output_text",
                    "text": "I don't have a favorite animal.",
                    "annotations": []
                }
            ],
        },
        {
            "type": "message",
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "Why is the sky blue?",
                }
            ],
        },
    ],
    "reasoning": {
        "effort": "high"
    },
    "max_output_tokens": 5000,
}

response = requests.post(url, headers=headers, json=data)

print(response.status_code)
print(response.json())

Antworten mit Reasoning-Informationen

Wenn Reasoning aktiviert ist, gibt die API Ergebnisse zurück, die Reasoning-Daten enthalten:
{
  "id": "resp_051e00420efb9e150069aff6a18418819591abb7ce5f8487ed",
  "object": "response",
  "created_at": 1773139617,
  "status": "completed",
  "background": false,
  "completed_at": 1773139621,
  "content_filters": [
    {
      "blocked": false,
      "source_type": "completion",
      "content_filter_raw": [],
      "content_filter_results": {},
      "content_filter_offsets": {
        "start_offset": 0,
        "end_offset": 1147,
        "check_offset": 0
      }
    }
  ],
  "error": null,
  "frequency_penalty": 0.0,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": 5000,
  "max_tool_calls": null,
  "model": "gpt-54",
  "output": [
    {
      "id": "rs_051e00420efb9e150069aff6a32f948195996db3ff98314ef2",
      "type": "reasoning",
      "summary": []
    },
    {
      "id": "msg_051e00420efb9e150069aff6a33d808195825716a666d8ba8b",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "annotations": [],
          "logprobs": [],
          "text": "The sky looks blue because of how sunlight interacts with Earth’s atmosphere.\n\n1. **Sunlight isn’t just “white”**\nSunlight is made of many colors (red, orange, yellow, green, blue, violet), each with different wavelengths.\n\n2. **Air scatters short wavelengths more**\nAs sunlight passes through the atmosphere, it hits gas molecules and tiny particles.\n- Shorter wavelengths (blue, violet) are scattered in all directions much more than longer wavelengths (red, orange).\n- This effect is called **Rayleigh scattering**.\n\n3. **We see more blue than violet**\n- Our eyes are more sensitive to blue than to violet.\n- Some violet light is also absorbed higher in the atmosphere.\nSo the scattered light we perceive is mostly blue.\n\n4. **Why sunsets are red/orange**\nAt sunrise and sunset, sunlight passes through much more atmosphere.\n- Most of the blue light gets scattered out of the direct path.\n- The remaining light reaching your eyes from the Sun is richer in reds and oranges."
        }
      ]
    }
  ],
  "parallel_tool_calls": true,
  "presence_penalty": 0.0,
  "previous_response_id": null,
  "prompt_cache_key": null,
  "prompt_cache_retention": null,
  "reasoning": {
    "effort": "high",
    "summary": null
  },
  "safety_identifier": null,
  "service_tier": "default",
  "store": true,
  "temperature": 1.0,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "tool_choice": "auto",
  "tools": [],
  "top_logprobs": 0,
  "top_p": 1.0,
  "truncation": "disabled",
  "usage": {
    "input_tokens": 35,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 267,
    "output_tokens_details": {
      "reasoning_tokens": 29
    },
    "total_tokens": 302
  },
  "user": null,
  "metadata": {}
}

Nutzungsempfehlungen

  1. Wählen Sie die angemessene Reasoning-Aufwandsstufe: Verwenden Sie high für komplexe Probleme und low für einfache Aufgaben.
  2. Berücksichtigen Sie den Token-Verbrauch: Reasoning erhöht den Token-Verbrauch.
  3. Nutzen Sie Streaming: Für längere Reasoning-Ketten kann Streaming die Benutzererfahrung verbessern.
  4. Stellen Sie Kontext bereit: Geben Sie dem Modell ausreichend Kontext, um effektives Reasoning zu ermöglichen.

Zuletzt aktualisiert: 2026-06-01