---
title: GPT-5.4 Mini | Runware Docs
url: https://runware.ai/docs/models/openai-gpt-5-4-mini
description: Efficient reasoning LLM with 400K context for coding assistants and subagent workflows
---
# GPT-5.4 Mini

![GPT-5.4 Mini](https://assets.runware.ai/covers/openai-gpt-5-4-mini.jpg)

GPT-5.4 Mini is a compact, efficient variant of GPT-5.4 designed for coding assistants, subagent orchestration, and multimodal applications requiring faster responsiveness. It supports a 400K token context window and retains native computer use and configurable reasoning effort at a lower cost than the flagship model.

- **Status**: live
- **ID**: `openai-gpt-5-4-mini`
- Try in Playground
- **Context window**: 400K context
- **Max output**: 128K output
- **Creator**: OpenAI
- **Release Date**: March 17, 2026
- **Capabilities**: Text to Text, Image to Text, Checkpoint

## Pricing

~$0.0128 typical run

**Rates** (per 1M tokens)

- Input: `$0.75`
- Output: `$4.50`

**5 example generations**

- [tool-calling](https://runware.ai/docs/models/openai-gpt-5-4-mini/examples#example-production-deployment-timing-brief): `$0.000224` (~1s)
- [search-grounded](https://runware.ai/docs/models/openai-gpt-5-4-mini/examples#example-eu-ai-act-compliance-update): `$0.0103` (~8s)
- [code-interpreter](https://runware.ai/docs/models/openai-gpt-5-4-mini/examples#example-neighborhood-bistro-menu-profitability-analysis): `$0.0128` (~16s)
- [text-generation](https://runware.ai/docs/models/openai-gpt-5-4-mini/examples#example-subscription-billing-migration-decision-memo): `$0.0273` (~46s)
- [reference-to-text](https://runware.ai/docs/models/openai-gpt-5-4-mini/examples#example-roof-damage-triage-report): `$0.0308` (~1m)

billed per token, so a request costs what the model produced · times vary, measured end to end · [How pricing works](https://runware.ai/docs/models-api/pricing)

## Request Parameters

**API Options**

Platform-level options for task execution and delivery.

### [taskType](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `textInference`

Identifier for the type of task being performed.

### [taskUUID](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

### [outputFormat](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-outputformat)

- **Type**: `string`
- **Default**: `TEXT`

Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.

**Allowed values**: `TEXT`

### [webhookURL](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-webhookurl)

- **Type**: `string`
- **Format**: `uri`

Webhook URL that receives JSON responses via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.

**Learn more** (1 resource):

- [Webhooks](https://runware.ai/docs/models-api/webhooks) (platform)

### [deliveryMethod](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-deliverymethod)

- **Type**: `string`
- **Default**: `sync`

Determines how the API delivers task results.

**Allowed values**:

- `sync` Returns results directly in the API response. Over HTTP, a task still running after 120 seconds continues as an async task and comes back with status 'processing'. Poll for its results using getResponse.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.
- `stream` Streams results token-by-token as they are generated.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/models-api/task-polling) (platform)

### [includeCost](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-includecost)

- **Type**: `boolean`
- **Default**: `true`

Include task cost in the response.

### [includeUsage](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-includeusage)

- **Type**: `boolean`

Include token usage statistics in the response.

### [numberResults](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-numberresults)

- **Type**: `integer`
- **Min**: `1`
- **Max**: `4`
- **Default**: `1`

Number of results to generate. Each result uses a different seed, producing variations of the same parameters.

**Inputs**

Input resources for the task (images, audio, etc). These must be nested inside the \`inputs\` object.

### [images](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-inputs-images)

- **Path**: `inputs.images`
- **Type**: `array of strings`
- **Min items**: `1`
- **File size (each)**: `up to 32 MB`

Array of image inputs (UUID, URL, Data URI, or Base64).

**Core Parameters**

Primary parameters that define the task output.

### [model](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-model)

- **Type**: `string`
- **Required**: true
- **Value**: `openai-gpt-5-4-mini`

Send `auto` instead of an AIR identifier to have the model router choose the model for this task. The rest of the request is unchanged, every value you send is kept, and only the parameters you leave out are filled in. See [Model Router](https://runware.ai/docs/models-api/model-router).

**Learn more** (3 resources):

- [Text To Image: Model Selection](https://runware.ai/docs/learn/text-to-image#model-selection) (learn)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/learn/image-inpainting#model-specialized-inpainting-models) (learn)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/learn/image-outpainting#other-critical-parameters) (learn)

### [seed](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-seed)

- **Type**: `integer`
- **Min**: `0`
- **Max**: `9223372036854776000`

Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.

**Learn more** (1 resource):

- [Seed](https://runware.ai/docs/learn/seed) (learn)

### [messages](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-messages)

- **Path**: `messages.role`
- **Type**: `array of objects (2 properties)`
- **Required**: true
- **Min items**: `1`

Array of chat messages forming the conversation context. The final message must use the user role.

#### [role](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-messages-role)

- **Path**: `messages.role`
- **Type**: `string`
- **Required**: true

Role of the message author.

**Allowed values**: `user` `assistant`

#### [content](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-messages-content)

- **Path**: `messages.content`
- **Type**: `string`
- **Required**: true
- **Min**: `1`

Text content of the message.

**Settings**

Technical parameters to fine-tune the inference process. These must be nested inside the \`settings\` object.

### [systemPrompt](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-settings-systemprompt)

- **Path**: `settings.systemPrompt`
- **Type**: `string`
- **Min**: `1`
- **Max**: `200000`

System-level instruction that guides the model's behavior and output style across the entire generation.

### [temperature](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-settings-temperature)

- **Path**: `settings.temperature`
- **Type**: `float`
- **Min**: `0`
- **Max**: `2`
- **Step**: `0.01`
- **Default**: `1`

Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity.

### [topP](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-settings-topp)

- **Path**: `settings.topP`
- **Type**: `float`
- **Min**: `0`
- **Max**: `1`
- **Step**: `0.01`
- **Default**: `0.95`

Nucleus sampling parameter that controls diversity by limiting the probability mass. Lower values make outputs more focused, higher values increase diversity.

### [maxTokens](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-settings-maxtokens)

- **Path**: `settings.maxTokens`
- **Type**: `integer`
- **Min**: `1`
- **Max**: `128000`
- **Default**: `4096`

Maximum number of tokens to generate in the response.

### [thinkingLevel](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-settings-thinkinglevel)

- **Path**: `settings.thinkingLevel`
- **Type**: `string`

Controls the depth of internal reasoning the model performs before generating a response.

**Allowed values**: `low` `medium` `high` `xhigh`

### [toolChoice](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-toolchoice)

- **Path**: `toolChoice.type`
- **Type**: `object (2 properties)`

Controls how the model selects which tool to call. This only takes effect when `tools` are defined.

**Examples**:

**Let the model decide (default):**

```json
"toolChoice": {
  "type": "auto"
}
```

**Force a specific tool call:**

```json
"toolChoice": {
  "type": "tool",
  "name": "get_weather"
}
```

**Require any tool call:**

```json
"toolChoice": {
  "type": "any"
}
```

#### [type](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-toolchoice-type)

- **Path**: `toolChoice.type`
- **Type**: `string`
- **Required**: true

Strategy the model uses to decide when and which tools to call.

**Allowed values**:

- `auto` Tool calls decided by the model from the conversation context. This is the recommended default.
- `any` At least one tool call, with the model choosing which tool. Useful when you always need structured output.
- `tool` Call to the specific tool identified by `name`. Use this to force a particular function call.
- `none` No tool calls, even if tools are defined. Useful for forcing a text-only response.

#### [name](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-toolchoice-name)

- **Path**: `toolChoice.name`
- **Type**: `string`

Name of the specific tool the model must call. Required when type is `tool`.

### [tools](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-tools)

- **Path**: `tools.type`
- **Type**: `array of objects (4 properties)`
- **Min items**: `1`

An array of tool definitions that the model may call during generation. The model can invoke one or more tools based on the conversation context, outputting structured calls with arguments instead of (or alongside) free-text.

For `function` tools, each definition requires:

- **`type`**: `"function"`
- **`name`**: Unique identifier (alphanumeric, hyphens, underscores; max 64 chars).
- **`description`**: What the function does. The model uses this to decide when to call it.
- **`schema`**: JSON Schema object describing the expected input arguments.

> [!NOTE]
> The `search` tool is executed server-side by the provider. You don't need to handle the tool result yourself.

> [!NOTE]
> The `codeInterpreter` tool is executed server-side by the provider. You don't need to handle the tool result yourself.

**Examples**:

**Function tool, weather lookup:**

```json
"tools": [
  {
    "type": "function",
    "name": "get_weather",
    "description": "Get current weather for a city",
    "schema": {
      "type": "object",
      "properties": {
        "city": { "type": "string", "description": "City name" }
      },
      "required": ["city"]
    }
  }
],
"toolChoice": { "type": "auto" }
```

**Built-in web search:**

```json
"tools": [
  { "type": "search" }
]
```

**Built-in code interpreter:**

```json
"tools": [
  { "type": "codeInterpreter" }
]
```

**Multiple function tools:**

```json
"tools": [
  {
    "type": "function",
    "name": "search_products",
    "description": "Search the product catalog by query and filters.",
    "schema": {
      "type": "object",
      "properties": {
        "query": { "type": "string" },
        "category": { "type": "string" }
      },
      "required": ["query"]
    }
  },
  {
    "type": "function",
    "name": "add_to_cart",
    "description": "Add a product to the user's shopping cart.",
    "schema": {
      "type": "object",
      "properties": {
        "productId": { "type": "string" },
        "quantity": { "type": "integer", "minimum": 1 }
      },
      "required": ["productId"]
    }
  }
]
```

#### [type](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-tools-type)

- **Path**: `tools.type`
- **Type**: `string`
- **Required**: true

Kind of tool to make available to the model. User-defined functions require `name` and `schema`, while built-in tools (`search`, `codeInterpreter`) are executed server-side by the provider.

**Allowed values**:

- `function` User-defined function tool. The model outputs the tool name and arguments. You execute the function locally and send results back.
- `search` Built-in web search. The provider executes search server-side and enriches the response automatically.
- `codeInterpreter` Built-in code execution sandbox (Python). The provider runs code server-side and returns results automatically.

#### [name](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-tools-name)

- **Path**: `tools.name`
- **Type**: `string`
- **Max**: `64`

Unique function name. Required for function tools.

#### [description](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-tools-description)

- **Path**: `tools.description`
- **Type**: `string`

Explanation of what the function does, used by the model to decide when to call it.

#### [schema](https://runware.ai/docs/models/openai-gpt-5-4-mini#request-tools-schema)

- **Path**: `tools.schema`
- **Type**: `object`

JSON Schema object describing the function's input parameters.

## Response Parameters

### [taskType](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `textInference`

Identifier for the type of task this response belongs to.

### [taskUUID](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier echoed from the original request, used to match async responses to their tasks.

### [text](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-text)

- **Type**: `string`
- **Required**: true

Generated text content.

### [cost](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-cost)

- **Type**: `float`

Task cost in USD. Present when `includeCost` is set to `true` in the request.

### [finishReason](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-finishreason)

- **Type**: `string`
- **Required**: true

The reason why the model stopped generating tokens.

**Possible values**: `stop` `length` `content_filter` `unknown`

### [usage](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-usage)

- **Path**: `usage.promptTokens`
- **Type**: `object (4 properties)`
- **Required**: true

Token usage statistics for the request.

#### [promptTokens](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-usage-prompttokens)

- **Path**: `usage.promptTokens`
- **Type**: `integer`
- **Required**: true
- **Min**: `0`

Number of tokens in the input prompt.

#### [completionTokens](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-usage-completiontokens)

- **Path**: `usage.completionTokens`
- **Type**: `integer`
- **Required**: true
- **Min**: `0`

Number of tokens generated in the response.

#### [totalTokens](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-usage-totaltokens)

- **Path**: `usage.totalTokens`
- **Type**: `integer`
- **Required**: true
- **Min**: `0`

Total number of tokens used (prompt + completion).

#### [thinkingTokens](https://runware.ai/docs/models/openai-gpt-5-4-mini#response-usage-thinkingtokens)

- **Path**: `usage.thinkingTokens`
- **Type**: `integer`
- **Min**: `0`

Number of tokens used for internal reasoning. Billed separately.

## Examples

### code-interpreter (code-interpreter)

```
## Executive summary

- **Total dinner-menu sales revenue:** **$35,719.00**
- **Total adjusted contribution:** **$19,279.30**
- **Adjusted contribution margin percentage:** **54.0%**

Cutoffs used for menu engineering:
- **Popularity cutoff (median units sold): 107**
- **Margin cutoff (median adjusted contribution/portion): $13.73**

---

## Compact menu performance table  
Sorted by **total contribution descending**

| Item | Units Sold | Price | Waste-Adj. Ingredient Cost | Labor Cost | Adj. CM / Portion | Total Contribution | Contribution / Active Prep Min | Class |
|---|---:|---:|---:|---:|---:|---:|---:|---|
| Roast Chicken | 186 | $24.00 | $7.55 | $2.20 | $14.25 | $2,649.91 | $2.59 | Star |
| Steak Frites | 164 | $34.00 | $14.95 | $3.00 | $16.05 | $2,632.63 | $2.14 | Star |
| Bistro Burger | 211 | $21.00 | $8.04 | $1.60 | $11.36 | $2,396.70 | $2.84 | Plowhorse |
| Pork Schnitzel | 129 | $26.00 | $8.82 | $2.40 | $14.78 | $1,906.98 | $2.46 | Star |
| Braised Short Rib | 118 | $31.00 | $12.29 | $2.60 | $16.11 | $1,900.78 | $2.48 | Star |
| Mushroom Tagliatelle | 142 | $22.00 | $5.93 | $2.80 | $13.27 | $1,883.76 | $1.90 | Plowhorse |
| Seared Trout | 96 | $28.00 | $10.91 | $3.20 | $13.89 | $1,333.53 | $1.74 | Puzzle |
| Ricotta Gnocchi | 83 | $24.00 | $6.63 | $3.80 | $13.57 | $1,126.38 | $1.43 | Dog |
| Market Risotto | 72 | $25.00 | $7.67 | $4.20 | $13.13 | $945.04 | $1.25 | Dog |
| Duck Confit | 61 | $30.00 | $11.30 | $4.00 | $14.70 | $896.43 | $1.47 | Puzzle |
| Crispy Eggplant | 78 | $20.00 | $5.06 | $3.60 | $11.34 | $884.61 | $1.26 | Dog |
| Cauliflower Steak | 54 | $23.00 | $6.22 | $3.40 | $13.38 | $722.55 | $1.57 | Dog |

### Notes on the metrics
- **Waste-adjusted ingredient cost/portion** = ingredient cost ÷ (1 − waste%)
- **Labor cost/portion** = prep minutes × $24/hr ÷ 60
- **Adjusted contribution/portion** = price − waste-adjusted ingredient cost − labor cost
- **Total contribution** = adjusted contribution/portion × units sold
- **Contribution per active prep minute** = total contribution ÷ total active prep minutes used across sold portions

---

## Strongest 3 dishes operationally

1. **Roast Chicken**  
   - Highest total contribution: **$2,649.91**
   - Strong margin per portion: **$14.25**
   - Good labor efficiency: **$2.59 per active prep minute**

2. **Steak Frites**  
   - Total contribution: **$2,632.63**
   - Highest per-portion margin in the top sellers: **$16.05**
   - Solid labor efficiency: **$2.14 per active prep minute**

3. **Bistro Burger**  
   - High volume leader: **211 units**
   - Strong total contribution: **$2,396.70**
   - Best labor efficiency in the set: **$2.84 per active prep minute**

---

## Weakest 3 dishes operationally

1. **Cauliflower Steak**  
   - Lowest total contribution: **$722.55**
   - Low volume: **54 units**
   - Weak margin profile: **$13.38 per portion**
   - Low labor efficiency: **$1.57 per active prep minute**

2. **Crispy Eggplant**  
   - Total contribution: **$884.61**
   - Low margin per portion: **$11.34**
   - High labor burden: **$3.60 labor cost/portion**
   - Low labor efficiency: **$1.26 per active prep minute**

3. **Duck Confit**  
   - Total contribution: **$896.43**
   - Low volume: **61 units**
   - Heavy prep time: **10.0 minutes**
   - Lower labor efficiency: **$1.47 per active prep minute**

---

## Recommendations

1. **Protect and feature the Stars**
   - Keep **Roast Chicken, Steak Frites, Braised Short Rib, and Pork Schnitzel** prominent on the menu.
   - They combine strong contribution and, in most cases, high popularity or high margin.
   - Consider small price increases only if service execution stays consistent.

2. **Fix or rework the low-efficiency items**
   - **Crispy Eggplant, Cauliflower Steak, Market Risotto, and Duck Confit** have weak contribution per active minute and/or low total contribution.
   - Review prep steps, garnish complexity, and portioning to reduce labor and waste.
   - If no simplification is possible, these are candidates for removal or replacement.

3. **Use Plowhorses and Puzzles strategically**
   - **Bistro Burger** and **Mushroom Tagliatelle** sell well but have softer margin profiles; test modest pricing or ingredient-cost controls.
   - **Seared Trout** and **Duck Confit** have acceptable-to-strong margin per portion but lower popularity; keep quality high and consider menu placement or server highlighting rather than discounting.

---

## How the classification was done

I used the **median** as the cutoff for both axes:
- **Popularity**: units sold
- **Margin**: adjusted contribution margin per portion

Rules:
- Values **equal to or above** the median are treated as **High**
- Values **below** the median are treated as **Low**

Menu-engineering categories:
- **Star** = High popularity, High margin
- **Plowhorse** = High popularity, Low margin
- **Puzzle** = Low popularity, High margin
- **Dog** = Low popularity, Low margin

If you'd like, I can also turn this into a one-page manager report or a spreadsheet-ready CSV.
```

Finish reason: `stop`

```json
{
  "taskType": "textInference",
  "taskUUID": "5e54bc13-3004-4ab1-8424-963a0f688d3e",
  "model": "openai:gpt@5.4-mini",
  "messages": [
    {
      "role": "user",
      "content": "Act as a restaurant operations analyst for Juniper Table, a 54-seat neighborhood bistro. Use Python to analyze the following 14-day dinner-menu data.\n\nitem,units_sold,price_usd,ingredient_cost_usd,waste_pct,active_prep_minutes\nRoast Chicken,186,24,7.10,6,5.5\nMushroom Tagliatelle,142,22,5.40,9,7.0\nBraised Short Rib,118,31,11.80,4,6.5\nSeared Trout,96,28,9.60,12,8.0\nSteak Frites,164,34,14.20,5,7.5\nCrispy Eggplant,78,20,4.30,15,9.0\nBistro Burger,211,21,7.80,3,4.0\nDuck Confit,61,30,10.40,8,10.0\nCauliflower Steak,54,23,5.10,18,8.5\nPork Schnitzel,129,26,8.20,7,6.0\nRicotta Gnocchi,83,24,5.90,11,9.5\nMarket Risotto,72,25,6.60,14,10.5\n\nAssume active kitchen labor costs $24 per hour. For each dish, calculate:\n1. Waste-adjusted ingredient cost per sold portion = ingredient_cost_usd / (1 - waste_pct / 100).\n2. Labor cost per portion = active_prep_minutes × $24 / 60.\n3. Adjusted contribution margin per portion = price - waste-adjusted ingredient cost - labor cost.\n4. Total contribution over the 14-day period.\n5. Contribution earned per active prep minute.\n\nClassify each dish using the menu-engineering matrix, with the median units sold as the popularity cutoff and the median adjusted contribution margin per portion as the margin cutoff. Treat values equal to a cutoff as high. Categories are Star (high popularity, high margin), Plowhorse (high popularity, low margin), Puzzle (low popularity, high margin), and Dog (low popularity, low margin).\n\nReturn:\n- An executive summary with total sales revenue, total adjusted contribution, and adjusted contribution margin percentage.\n- A compact table for all dishes showing the calculated metrics and classification, sorted by total contribution descending.\n- The three strongest and three weakest dishes operationally, supported by the figures.\n- Three concrete recommendations covering pricing, preparation, promotion, or removal. Do not invent customer research or demand effects.\n- A concise explanation of the calculation and classification method.\n\nRound currency to two decimals and percentages to one decimal place."
    }
  ],
  "tools": [
    {
      "type": "codeInterpreter"
    }
  ],
  "toolChoice": {
    "type": "any"
  }
}
```

---

### search-grounded (search-grounded)

```
- **31 July 2026 — Commission guidance on GPAI providers published/updated.** The Commission’s GPAI provider guidance says the Commission’s enforcement powers start **2 August 2026**, and that providers who have **not signed** the GPAI Code of Practice should rely on the guidance’s compliance path. **Binding vs nonbinding:** the guidance is **nonbinding**; the 2 August 2026 enforcement date reflects the AI Act timetable. **Practical implication:** if you are launching soon, your documentation, risk/process controls, and EU reporting posture should be aligned now. ([digital-strategy.ec.europa.eu](https://digital-strategy.ec.europa.eu/en/policies/guidelines-gpai-providers?utm_source=openai))

- **31 July 2026 — Commission FAQ on the GPAI Code of Practice clarified compliance options.** The FAQ reiterates that the Code is a **voluntary** compliance tool, but from **2 August 2026** the Commission will enforce full compliance with GPAI obligations, and the AI Office may update the Code periodically. **Binding vs nonbinding:** Code/FAQ are **nonbinding**; enforcement date is binding. **Practical implication:** signing the Code can reduce uncertainty, but non-signatories should be ready to prove equivalent compliance. ([digital-strategy.ec.europa.eu](https://digital-strategy.ec.europa.eu/en/faqs/questions-and-answers-code-practice-general-purpose-ai?utm_source=openai))

- **20 July 2026 / published in OJ last month — Implementing Regulation on Commission proceedings.** Regulation (EU) 2026/1755 sets detailed procedural rules for Commission proceedings, including requests for access to a GPAI model under Article 92(3). **Binding vs nonbinding:** **binding** implementing regulation. **Practical implication:** providers should prepare internal escalation, secure access, and technical-response processes for any Commission request. ([eur-lex.europa.eu](https://eur-lex.europa.eu/eli/reg_impl/2026/1755/oj/eng/pdf?utm_source=openai))

- **9 July 2026 — Commission approved the Transparency Code (adjacent but relevant).** The Commission concluded the Transparency Code adequately covers AI Act transparency obligations for generative AI systems, including GPAI-related use cases. **Binding vs nonbinding:** this is a **nonbinding** code, but Commission approval clarifies the expected compliance route. **Practical implication:** if your model generates content, align disclosure/tracing controls with this code to reduce launch risk. ([digital-strategy.ec.europa.eu](https://digital-strategy.ec.europa.eu/en/library/commission-opinion-assessment-code-practice-transparency-ai-generated-content?utm_source=openai))

- **26 June 2026 / 4 weeks ago — AI Office signatory taskforce and enforcement framework clarified operational handling.** The Commission’s enforcement page and taskforce page explain complaint channels, signatory support, and that enforcement powers apply from **2 August 2026**. **Binding vs nonbinding:** mostly **administrative guidance**, not new substantive duties. **Practical implication:** expect more active scrutiny and faster compliance interactions once the August enforcement date hits. ([digital-strategy.ec.europa.eu](https://digital-strategy.ec.europa.eu/en/policies/signatory-taskforce-gpai-code-practice?utm_source=openai))

**No change found:** the major GPAI enforcement start date remains **2 August 2026**, and the grandfathering deadline for models placed on the market before **2 August 2025** remains **2 August 2027**. ([digital-strategy.ec.europa.eu](https://digital-strategy.ec.europa.eu/en/policies/guidelines-gpai-providers?utm_source=openai))
```

Finish reason: `stop`

```json
{
  "taskType": "textInference",
  "taskUUID": "118dffa7-a730-4ddb-8709-83cd49ea39d4",
  "model": "openai:gpt@5.4-mini",
  "messages": [
    {
      "role": "user",
      "content": "Search current official EU sources and answer this focused compliance question: As of today, have any EU AI Act rules, implementation dates, codes of practice, guidelines, or enforcement arrangements affecting providers of general-purpose AI models changed or been formally clarified within the last 90 days? Summarize only developments that could alter launch planning for a company releasing a GPAI model in the EU. Limit the answer to five bullets and 250 words. For each development, state the publication date, what changed or was clarified, and the practical implication. Ground every bullet in a retrieved primary source with an inline link, distinguish binding requirements from nonbinding guidance, and end with a one-line 'No change found' statement for any major deadline you checked that remains unchanged."
    }
  ],
  "tools": [
    {
      "type": "search"
    }
  ],
  "toolChoice": {
    "type": "any"
  }
}
```

---

### tool-calling (tool-calling)

```
{
  "taskType": "textInference",
  "taskUUID": "ffba1178-b3d8-4a1d-97ad-2c25c08c6e31",
  "cost": 0.000224,
  "finishReason": "tools",
  "tools": [
    {
      "id": "call_xede6cPbYz5l1G0moCGMiDgT",
      "name": "get_current_utc_time"
    }
  ]
}
```

Finish reason: `tools`

```json
{
  "taskType": "textInference",
  "taskUUID": "ffba1178-b3d8-4a1d-97ad-2c25c08c6e31",
  "model": "openai:gpt@5.4-mini",
  "messages": [
    {
      "role": "user",
      "content": "Act as the release coordinator for the production rollout of Parcel Routing API v8.14.0 across Frankfurt, Virginia, and Singapore. Before writing anything, call get_current_utc_time; do not estimate or infer the time. The client will inspect your returned tool call, execute the named function with the arguments you provide, and return its result. Once that result is available, produce a concise deployment timing brief anchored to the returned UTC timestamp. Include the kickoff time, smoke-test checkpoint at +15 minutes, regional health review at +45 minutes, rollout completion target at +90 minutes, and rollback-watch end at +150 minutes. Show every timestamp in ISO 8601 UTC, assign each checkpoint to the appropriate release lead, and finish with a short operator checklist."
    }
  ],
  "tools": [
    {
      "type": "function",
      "name": "get_current_utc_time",
      "description": "Returns the current date and time in UTC.",
      "schema": {
        "type": "object"
      }
    }
  ],
  "toolChoice": {
    "type": "tool",
    "name": "get_current_utc_time"
  }
}
```

---

### reference-to-text (reference-to-text)

```
Below is a triage-level read based only on the single drone image provided.

## 1) Executive summary
The roof appears generally intact over most visible slopes, but there is **one major localized roof-covering failure/open area on the upper-left/center main slope** with tan substrate exposed and surrounding shingles torn/lifted. That is the **most urgent concern** because it is a likely entry point for moisture and should be prioritized for temporary protection and close-up inspection.

Secondary concerns are **tree-branch contact across the upper slope** and **significant debris accumulation on the lower-right roof area/dormer intersection**, which may be obscuring hidden damage or trapping moisture.

---

## 2) Visible issues table

| Roof location | Visual evidence | Likely defect category | Severity | Recommended action | Confidence |
|---|---|---|---|---|---|
| Upper-left to center of main front slope | Large irregular tan area visible; surrounding black shingle material is torn/lifted; roof covering is missing over a broad section | Localized shingle loss / open roof section / possible failed temporary repair | **Urgent** | Protect/dry-in immediately if active exposure is present; then inspect exposed substrate, underlayment, and adjacent shingle field for concealed damage and moisture intrusion | **High** |
| Upper center-right slope near ridge | Tree limb/branch is resting across shingles and extending down the slope | Debris contact / possible abrasion or impact to roof covering | **Moderate** | Remove branch carefully; inspect the contact path for lifted tabs, punctures, scuffs, or displaced shingles | **Medium** |
| Lower-right roof plane and adjacent eave/dormer area | Heavy leaf/twig buildup is visible on the roof surface and along the lower edge; parts of the roof are obscured | Debris accumulation / concealed surface condition / possible drainage obstruction | **Moderate** | Clear debris and inspect the concealed roof surface, valley/transition areas, and drainage path for hidden damage or trapped moisture | **Medium** |

---

## 3) Components that appear intact or show no obvious damage in this view
- Most visible asphalt shingles outside the damaged area appear generally uniform and in place.
- The brick chimney stack appears generally intact from this distance.
- Chimney cap/upper metal assembly is visible and appears present.
- The round pipe vent/roof penetration appears present with flashing visible.
- Visible siding, windows, and soffit areas appear generally intact in this image.
- No obvious widespread roof sagging or collapse is visible from this single view.

---

## 4) Recommended on-site inspection sequence for a roofer
1. **Document from the ground and attic first** if accessible: look for ceiling staining, wet insulation, or active leakage below the exposed upper-slope area.
2. **Safely remove loose branches and roof debris** so the surface can be seen clearly.
3. **Inspect the large exposed area first**: confirm the exact extent of missing covering, check the substrate/underlayment, and determine whether it is a temporary patch or an open breach.
4. **Inspect the shingles adjacent to the damaged area** for lifted tabs, torn edges, fastener exposure, or additional hidden openings.
5. **Inspect the branch contact path** across the upper slope for abrasion or puncture marks.
6. **Inspect the lower-right roof/dormer intersection** after debris removal, with special attention to any valley, sidewall, or step-flashing details.
7. **Check the chimney flashing and the pipe vent flashing** at close range.
8. **Verify eave/gutter drainage** for blockage or signs of backup, then re-check interior signs of leakage after the next wetting event if needed.

---

## 5) Explicit limitations
- This is **one aerial image only**; it does not show the rear roof planes, all edges, or the underside/attic.
- Branches and debris **obscure parts of the roof**, especially the lower-right area and some of the upper slope.
- The image is too distant to assess **shingle fasteners, sealant condition, granule loss, small cracks, or nail pops**.
- Flashing details at the chimney, valley, and roof-to-wall transitions are **not fully verifiable** from this angle.
- The condition of the roof deck, underlayment, and interior moisture status **cannot be determined** from this photo alone.
- This report does **not** determine cause, timing, coverage, or structural safety.
```

Finish reason: `stop`

```json
{
  "taskType": "textInference",
  "taskUUID": "93b438be-c289-422a-9ab3-f22ecdc2d55a",
  "model": "openai:gpt@5.4-mini",
  "settings": {
    "thinkingLevel": "high"
  },
  "inputs": {
    "images": [
      "https://assets.runware.ai/assets/inputs/ad0bac00-e661-42a7-81f3-b5e375fb7f9a.jpg"
    ]
  },
  "messages": [
    {
      "role": "user",
      "content": "Act as a property-claims roof inspection analyst. Examine the attached drone photograph closely and prepare a concise field triage report for the claims adjuster and roofing contractor.\n\nInclude:\n1. An executive summary of the roof’s apparent condition and the most urgent concern.\n2. A table of every visible issue with: roof location, visual evidence, likely defect category, severity (urgent/high/moderate/low), recommended action, and confidence (high/medium/low).\n3. A separate list of components that appear intact or show no obvious damage in this view.\n4. A recommended inspection sequence for an on-site roofer.\n5. Explicit limitations: identify areas that are obscured, too distant, or impossible to assess from this single image.\n\nUse only visible evidence. Distinguish direct observations from interpretations, do not claim a storm caused a condition solely from appearance, do not estimate repair cost, and do not make a final coverage or structural-safety determination."
    }
  ]
}
```

---

### text-generation (text-generation)

```
# Architecture Decision Memo: Billing Domain Separation

## Decision

**Recommend Approach 2: extract a modular billing service with its own relational ledger, and use change data capture (CDC) during migration.**

This is the best fit for Northstar Classroom’s constraints: it separates the billing domain within 12 months, preserves an immutable audit trail, avoids a flag-day cutover, and is realistic for a 14-person backend team that must keep shipping roadmap work. It is also the safest way to preserve finance controls and PCI boundaries without betting the company on a full rewrite.

## Executive Summary

Northstar’s current billing monolith has served reliably enough that there is **no confirmed ledger data loss**, but it is now carrying too much risk in one codebase and one database. The core issue is not transaction throughput; **55 TPS at peak is modest**. The issue is coupling: subscriptions, invoices, credits, payments, refunds, revenue adjustments, finance close, and 57 direct consumers are all tied to the same schema and release train.

Approach 1, a full event-sourced rewrite with simultaneous migration, is technically appealing but operationally reckless here. It is the highest-risk path, the hardest to verify, and the least compatible with the 12-month separation goal.

Approach 3, keeping the monolith as the system of record and layering an API façade plus read replicas, is safer in the short term but does **not** meaningfully separate ownership of monetary state. It prolongs the coupling that is already constraining engineering and finance.

Approach 2 gives us the right balance: a **separate billing service with a relational ledger** that becomes the authoritative source of monetary state, while CDC and reconciliation allow incremental migration of workflows and integrations. This is not “modern for modern’s sake”; it is the simplest design that satisfies auditability, reversibility, and the recovery objectives.

**Assumptions**
- The billing domain can be isolated from other product domains without a company-wide freeze.
- Existing direct database consumers are not all permanently fixed requirements; they can be migrated or placed behind controlled read paths.
- No additional compliance obligations beyond preserving PCI boundary separation and an immutable audit trail are in scope.

## Context and Non-Negotiable Constraints

- **Finance:** Books close within five business days and require an immutable audit trail.
- **Security:** Card data is tokenized by the processor; we must preserve PCI scope boundaries.
- **Engineering capacity:** 14 backend developers; no pause in roadmap work for more than one quarter.
- **Operational reality:** 12-year-old Rails monolith, one PostgreSQL database, billing jobs sometimes time out, but no confirmed ledger loss.
- **Ecosystem dependency:** ~40 internal workflows and 17 downstream integrations read billing tables directly.
- **Leadership goal:** Separate the billing domain within 12 months, without a flag-day cutover.
- **Reliability:** RPO under five minutes and RTO under 30 minutes.

## Options Considered

| Option | Delivery Risk | Auditability | Reversibility | Operational Complexity | 12-Month Feasibility |
|---|---|---:|---:|---:|---:|
| 1. Event-sourced rewrite, migrate all at once | Very High | High if completed, but unproven during migration | Low | Very High | Low |
| 2. Modular billing service with relational ledger + CDC migration | Medium | High | Medium-High | Medium-High | High |
| 3. Keep monolith as SoR + API façade + read replicas | Low near-term, but structural risk remains | Medium | High | Low-Medium | Low for true separation |

### Option 1: Event-sourced rewrite, all-at-once migration
This is the riskiest option. Event sourcing can provide a strong audit trail, but a full rewrite requires getting domain semantics, replay behavior, idempotency, and historical backfill exactly right before cutover. With 57 consumers and timeboxed engineering capacity, the probability of prolonged overlap, hidden edge cases, and delayed adoption is too high.

### Option 3: API façade plus read replicas
This reduces immediate churn and can improve access patterns, but it leaves the monolith as the actual owner of monetary state. It also does not solve the core dependency problem; it only hides it. It is a reasonable short-term stabilization step, but not a true separation strategy.

## Recommended Target Architecture

Build a **Billing Service** that owns the monetary state in a **separate relational ledger database**. The monolith stops being the source of truth and becomes a temporary client during migration.

Key properties:

- **Single writer for monetary state:** all invoices, credits, payments, refunds, and revenue adjustments are committed through the Billing Service.
- **Append-only ledger model:** corrections are represented as new entries, not in-place edits. That supports auditability and finance review.
- **Idempotency:** every external command carries an idempotency key and a business reference ID. Unique constraints prevent duplicate posting on retries.
- **Ordering:** enforce per-account or per-subscription sequencing for monetary events. The service rejects or buffers out-of-order commands that would break invariants.
- **Duplicate delivery:** CDC and async consumers must be treated as at-least-once. Downstream handlers are idempotent; duplicates are deduplicated by event ID and version.
- **Schema evolution:** additive changes first, destructive changes last. Version APIs and ledger projections so consumers can move independently.
- **Direct database consumers:** migrate the 40 internal workflows and 17 integrations to API or CDC-fed read models. During transition, direct reads can use a controlled read replica, not the primary write store.
- **Backfills:** historical data is loaded by idempotent batch jobs keyed to source identifiers, with checksum validation and reconciliation before the service becomes authoritative.
- **Dual-running reconciliation:** for a bounded period, compare monolith-derived outputs with Billing Service outputs on the same business inputs. Stop on any unexplained monetary delta.
- **Disaster recovery:** deploy PITR-capable backups and a tested restore path for the Billing Service database. Recovery must be rehearsed, not assumed.
- **Ownership of monetary state:** the Billing Service is the system of record; the monolith becomes a consumer and eventually is removed from the billing write path.

## Migration Plan

### Phase 1: Foundation and historical mirror
**Entry criteria:** domain boundaries defined; ledger schema reviewed by finance and security; CDC path established from monolith; backup/restore runbook drafted.  
**Work:** create Billing Service, ledger tables, immutable journal, and reconciliation pipeline; backfill historical billing data; expose read APIs.  
**Exit criteria:** historical data reconciles; audit trail validated by finance; no unresolved discrepancies older than one business day.  
**Rollback trigger:** ledger backfill or reconciliation reveals unexplained balance mismatches that cannot be isolated quickly.

### Phase 2: Shadow posting and controlled dual-run
**Entry criteria:** Phase 1 reconciliation stable; idempotency and sequencing rules implemented; operational dashboards available.  
**Work:** monolith continues production writes, while Billing Service shadow-posts from CDC and computes parallel balances/charges/refunds.  
**Exit criteria:** at least one full billing cycle of matching results on critical paths; divergence rate remains at or near zero after reconciliation.  
**Rollback trigger:** any material divergence in monetary totals, invoice generation, or refund/credit behavior.

### Phase 3: Incremental write cutover by workflow
**Entry criteria:** shadow-run confidence established; consumer migration plan approved; support playbooks in place.  
**Work:** move write workflows one by one behind the Billing Service API; migrate direct consumers to read APIs or CDC-fed projections.  
**Exit criteria:** majority of billing writes originate from the Billing Service; legacy direct DB readers materially reduced; book-close process remains within five business days.  
**Rollback trigger:** workflow-specific failures that cannot be isolated to a single path or corrected within the rollback window.

### Phase 4: Authoritative cutover and monolith retirement
**Entry criteria:** all money-affecting workflows migrated; downstream integrations off primary DB access; DR test passed.  
**Work:** Billing Service becomes sole system of record; monolith billing tables become read-only or retired.  
**Exit criteria:** no production writes to legacy billing tables; decommission plan approved; recovery drill meets RPO/RTO targets.  
**Rollback trigger:** failure to restore within 30 minutes or unresolved ledger divergence after cutover.

## Data Integrity and Reconciliation Controls

- **Immutable journal entries** for all monetary changes.
- **Control totals** by day, account, invoice, and adjustment type.
- **Daily reconciliation** between source commands, ledger postings, and external processor confirmations.
- **Backfill checksums** to confirm migrated history matches source records.
- **Exception workflow** for any discrepancy, with finance signoff required for resolved corrections.
- **No in-place mutation** of settled monetary rows; corrections are new ledger entries.

## Security and PCI Boundary Considerations

The Billing Service should never store raw card data. It should retain only processor tokens and payment references, preserving the current PCI boundary. Payment authorization remains with the processor integration; the billing ledger records the financial outcome, not cardholder data. Access to billing data should be least-privilege, with audit logging on administrative actions and service-to-service authentication for internal calls.

Direct database access is a security and integrity liability. During migration, it should be restricted to controlled read-only paths and eliminated from write flows. This reduces both unauthorized mutation risk and accidental PCI-scope expansion.

## Observability and Service-Level Indicators

Define and review these SLIs continuously:

- **Ledger divergence:** count of unreconciled monetary postings or balance mismatches after reconciliation. Target: zero unresolved items at end of each business day.
- **Posting latency:** time from accepted billing command to durable ledger commit. Track p50/p95/p99.
- **Failed transactions:** rate of rejected or failed billing commands, split into validation failures vs technical failures.
- **Reconciliation lag:** time from source transaction or processor confirmation to matching ledger entry and downstream visibility.
- **Recovery readiness:** latest successful backup age, replica lag, last restore test date, and measured restore time versus the 5-minute RPO / 30-minute RTO targets.

Alerts should page on any unexplained ledger drift, restore-test failure, or reconciliation backlog beyond one business day.

## Principal Risks and Mitigations

1. **CDC complexity and duplicate delivery**
   - Mitigation: idempotent consumers, unique business keys, and replay-safe handlers.

2. **Dual-running overhead**
   - Mitigation: limit shadow-run to a defined window and a small number of critical workflows first.

3. **Direct consumers resisting migration**
   - Mitigation: set deprecation dates, provide read APIs and reports, and block new direct DB dependencies.

4. **Hidden business rules in the monolith**
   - Mitigation: move one workflow at a time, with finance-reviewed parity checks.

5. **DR not actually meeting objectives**
   - Mitigation: scheduled restore drills and documented failover procedures before cutover.

## Decisions Deferred

- Whether to further split payment orchestration from the billing ledger after separation is complete.
- Whether some downstream integrations should receive events instead of read APIs long term.
- Whether to retire all legacy billing reads or retain a limited reporting replica.
- Whether additional workflow modernization should follow the billing separation program.

## Approval Checklist

- [ ] Finance approves immutable ledger design and reconciliation controls.
- [ ] Security approves PCI boundary and token-only payment model.
- [ ] Engineering approves phased migration and deprecation plan for direct DB consumers.
- [ ] Operations approves backup, restore, and failover testing.
- [ ] Executive team approves the 12-month separation goal with no flag-day cutover.

**Concise recommendation for approval:** Approve **Approach 2** now: build a separate relational billing service as the system of record, use CDC and reconciliation to migrate safely, and retire direct monolith billing writes by phased cutover within 12 months.
```

Finish reason: `stop`

```json
{
  "taskType": "textInference",
  "taskUUID": "0dff8b72-da89-4d30-9490-a3ec7247a144",
  "model": "openai:gpt@5.4-mini",
  "settings": {
    "thinkingLevel": "medium"
  },
  "messages": [
    {
      "role": "user",
      "content": "Act as a principal software architect advising Northstar Classroom, a B2B SaaS company that bills 8,000 school districts. Write a polished architecture decision memo for engineering, finance, security, and executive reviewers.\n\nCurrent state:\n- A 12-year-old Ruby on Rails monolith owns subscriptions, invoices, credits, payments, refunds, and revenue adjustments in one PostgreSQL database.\n- Peak volume is 55 transactions per second during annual renewals.\n- Billing jobs sometimes time out, but the system has had no confirmed ledger data loss.\n- Finance closes the books within five business days and requires an immutable audit trail.\n- Payment card data is tokenized by the payment processor; the company must preserve PCI scope boundaries.\n- Roughly 40 internal workflows and 17 downstream integrations read billing tables directly.\n- The engineering team has 14 backend developers and cannot pause roadmap work for more than one quarter.\n- Leadership wants the billing domain separated within 12 months, without a flag-day cutover.\n- Recovery objectives are RPO under five minutes and RTO under 30 minutes.\n\nEvaluate these three approaches:\n1. Rewrite the billing domain as event-sourced services and migrate all workflows at once.\n2. Extract a modular billing service with its own relational ledger, using change data capture during migration.\n3. Keep the monolith as system of record and add an API façade plus read replicas.\n\nRecommend one approach. Be candid about tradeoffs and do not treat fashionable architecture as inherently superior. Do not invent costs, compliance certifications, staffing, or performance results beyond the facts provided. Clearly label any assumptions.\n\nProduce 1,400–1,800 words in Markdown with these sections:\n- Decision\n- Executive Summary\n- Context and Non-Negotiable Constraints\n- Options Considered (include a compact comparison table covering delivery risk, auditability, reversibility, operational complexity, and 12-month feasibility)\n- Recommended Target Architecture\n- Migration Plan (four phases, each with entry criteria, exit criteria, and rollback trigger)\n- Data Integrity and Reconciliation Controls\n- Security and PCI Boundary Considerations\n- Observability and Service-Level Indicators\n- Principal Risks and Mitigations\n- Decisions Deferred\n- Approval Checklist\n\nThe target architecture must explicitly address idempotency, ordering, duplicate delivery, schema evolution, direct database consumers, backfills, dual-running reconciliation, disaster recovery, and ownership of monetary state. Define measurable indicators for ledger divergence, posting latency, failed transactions, reconciliation lag, and recovery readiness. End with a concise recommendation suitable for an executive approval meeting."
    }
  ]
}
```