Skip to content

[BUG] CodeInterpreterCallImageOutput.DeserializeCodeInterpreterCallImageOutput throws invalid url length #850

@shanepowell

Description

@shanepowell

Describe the bug

On the line with new Uri(item.Value.GetString()) where the item.Value.GetString() returns: "data:image/png;base64,long base64 string"

i.e.:
if (item.NameEquals("url"u8))
{
imageUri = new Uri(item.Value.GetString());
continue;
}

I'm using OpenAI package version 2.7.0.

This using the gpt5.1 model with medium reasoning effort using the question:
Parse the time and city from the airport board shown in this image into a list.

I can provide the image if useful.

Steps to reproduce

This using the gpt5.1 model with medium reasoning effort against the responses API using the following question:
Parse the time and city from the airport board shown in this image into a list.

I can provide the image if useful. The image is sent the modal as a embedded image part after the text part above.

Code snippets

OS

Windows

.NET version

9

Library version

2.7.0

Metadata

Metadata

Assignees

Labels

area: externalThis issue is regarding an external experience, such as a companion service or client.issue-addressedWorkflow: The OpenAI maintainers believe the issue to be addressed and ready to close.questionCategory: The issue is seeking information about the library or its usage.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions