If a product is red and its generated description says blue, I want to know where that detail changed. Did the model misread the image, or did the writing step introduce the error? This is an illustrative example, not a recorded failure from the project.
That question is the reason to inspect more than the finished paragraph. I built a small product-description bench with a React interface and Node backend. It can send images and writing requirements in one model request, or split the work into visual analysis followed by copywriting. Each step can use a different provider and model.
The implemented result is a way to compare those paths and see what each request received and returned. I have not yet completed a matched-image output review that establishes which path produces better descriptions.
Follow one product detail through the requests
In the two-step route, I can read the visual description before judging the final copy. In the red-product example, an intermediate description saying blue would place the error in the image-reading step. If that description says red but the final copy says blue, the writing step changed it.
The implementation exposes that sequence:
Product images
-> analyzeImages(): visual description
-> formatDescription(): requested language, style and format
-> final copyanalyzeImages() sends the images to a model that accepts visual input. formatDescription() receives the returned text and does not inspect the images again. A wrong detail in that text can carry into the final description. Splitting the requests makes it visible; it does not automatically correct it.
This also gives the extra call a question to answer. Does the separation produce better copy on the same images, with enough benefit to justify its time and cost? The prototype has the request paths and measurements, but not that completed evaluation.
Put the writing requirements where the writing happens
The vision prompt leaves out free-form custom instructions and the requested output language. It can still include a controlled tone preset. The writing prompt adds language, tone, custom instructions and the HTML or plain-text requirements.
The first step describes the visible product. The second presents that description in the requested form. In the single-call route, the images and those requirements go into one request.
Both routes remain available, with OpenAI and OpenRouter provider support. Leaving instructions out of one phase is not a guarantee against malicious instructions in the input, and having two phases does not establish that the answer is more accurate.
Keep the prompt and model choice beside the output
The newer two-phase API returns system prompts, user prompts and responses for both steps, including the intermediate visual description. Its metadata includes provider and model choices, prompt-template versions, image count, response time and token usage for each phase.
The newer single-call route returns its combined prompts and totals. The legacy API returns the description and metadata without those prompt records. Those differences matter when comparing saved responses: a changed template or model is part of what changed in the experiment.
Retained prompts make a result easier to inspect. They do not guarantee that sending it again will produce identical text.
A returned cost and an estimate need different labels
For OpenRouter, the code first checks for a cost returned with usage:
if (result.provider === 'openrouter' && result.usage?.cost !== undefined) {
return result.usage.cost;
}If there is no returned amount, it estimates cost from input and output tokens using the configured price table. Those values have different origins. The saved configuration uses historical prices, so it cannot serve as a current price quote.
The grouped provider statistics have another limit. For a two-phase request using different providers, the logger attributes the full request cost to each involved provider group. Those groups therefore cannot be read as a phase-by-phase bill.
The local debug log retains input images, instructions and final descriptions in a JSON file. It uses read-modify-write, which needs better handling before concurrent use. It is a local inspection aid, rather than a durable trace store.
To finish the comparison, I need outputs generated from the same images and judged against the same product facts. Until then, the supported result is an implemented comparison bench. I have not verified a quality improvement, SEO result, cost saving or production deployment.
Project sources & checks
The private image-description MVP contains a React/Vite frontend and Node/Express backend. llmProvider.js, promptBuilder.js and logger.js support the comparison paths.
The newer API returns prompts; its two-phase mode returns intermediate analysis and per-phase time, token and cost fields. Its single-call branch returns combined prompts and totals. The legacy API returns description and metadata without prompts.
The product-color example explains how to read the two stages. It is illustrative, not a saved model response or a reported failure.
No matched-image quality result, SEO improvement, cost saving or production deployment has been verified. Configured prices are historical; grouped provider statistics attribute a full request cost to each involved provider.
Debug logs retain inputs and final output in a JSON file using read-modify-write. This is not a durable concurrent trace store, and retained prompts do not guarantee identical model output.