Repository navigation
Description
Summary
Selecting an image model in WebUI can implicitly save tools.media.image.quality: "". That empty value then suppresses an explicit quality: "high" supplied to image_generate, so the Images API request omits quality even though the tool-call input shown in the trace requests high quality.
The same trace can show a requested Sunburst model and a different effective model. I understand that a model explicitly selected in Settings is intended to take precedence; this report does not ask to bypass that selection. The problem is the implicit quality pin and the lack of an explanation of which arguments were overridden and why.
Steps to reproduce
-
Configure an OpenAI-compatible Custom provider that supports image generation.
-
Select
custom/gpt-image-2.5for the image role in WebUI without selecting any image quality. The saved section is:{ "model": "custom/gpt-image-2.5", "provider": "custom", "quality": "" } -
Invoke
image_generatewith the following arguments, or inspect a conversation in which the agent makes this call:{ "prompt": "A kitten", "model": "openai/gpt-image-2.5-sunburst", "quality": "high" } -
Compare the tool-call input, effective request parameters, and tool result.
A minimal reproduction of the quality resolution does not need credentials, an HTTP request, or a real image generation:
from raven.agent.tools.media_gen import ImageGenerateTool
from raven.config.schema import ImageToolConfig
for extra in ({}, {"quality": ""}, {"quality": "low"}):
config = ImageToolConfig(
model="custom/gpt-image-2.5",
provider="custom",
**extra,
)
print(extra, repr(ImageGenerateTool(config).effective_quality("high")))Output:
{} 'high'
{'quality': ''} ''
{'quality': 'low'} 'low'
Expected behavior
- Selecting only an image model should not silently change whether a per-call quality argument can take effect. An unset/inherit quality and an explicitly chosen provider-default quality need distinguishable semantics.
- If an empty string intentionally means "force the provider default, ignoring per-call quality", expose that choice in Settings and explain the override in the tool/trace UI. Currently the model picker writes it without a quality control.
- Keep the documented Settings model precedence, but make requested versus effective model/quality and their selection source clear. A trace should explain that the configured model replaced the requested model and that the requested quality was omitted because of Settings.
- Any model reported by the provider should be distinguished from Raven's outgoing model ID, if such information is available. Do not infer a provider's underlying model from an alias.
Actual behavior
The real local call succeeds, but its trace contains these different input and output values. Paths, session identifiers, and the original prompt are omitted:
{
"tool.name": "image_generate",
"input": {
"model": "openai/gpt-image-2.5-sunburst",
"quality": "high"
},
"result": {
"success": true,
"model": "gpt-image-2.5",
"quality": ""
}
}The result does not explain the override. Its model is Raven's resolved outgoing model ID, not a model name read from the provider response.
I also reproduced the request construction locally with httpx.MockTransport, without calling an external service:
| Image configuration | Tool-call quality | Outgoing model | Outgoing quality |
|---|---|---|---|
quality key omitted |
high |
gpt-image-2.5 |
high |
quality: "" (as saved by the picker) |
high |
gpt-image-2.5 |
omitted |
quality: "low" |
high |
gpt-image-2.5 |
low |
All three calls requested openai/gpt-image-2.5-sunburst; the configured model correctly remained authoritative. The first two quality cases differ only in whether the empty default was serialized.
Environment
- macOS, local deployment, zsh
- Raven 0.2.5, installed with uv, Python 3.12
- Observed in a TUI conversation trace displayed in the page interface; image selection configured through WebUI
- Image provider: Custom / OpenAI-compatible Images API; endpoint and credentials omitted
- Confirmed the relevant selection logic is also present on current
main(25e1b23ea685ab71c3f1bad248a5e1c934815b2d), and reproduced request construction using the checkout's implementation with a mock HTTP transport
Logs or screenshots
Relevant source on the inspected main revision:
- WebUI
mediaSelection()always writes a quality string, defaulting to empty. effective_quality()treats an explicitly present empty key as authoritative.- The tool schema says quality is used when Settings has no quality.
- Configured model precedence and provider-prefix normalization.
Related context: #828 introduced the provider-selection discussion and was fixed by #866. #1103 concerns model classification; this report concerns parameter resolution and its visibility after a model has already been selected.
Activity
fix(agent): an empty settings quality no longer pins image calls (#1137)
fix(ppt-engine): keep a deck's no-quality file name stable (#1155)