Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input tokens overhead #25

Open
usatenko opened this issue Mar 17, 2025 · 3 comments
Open

Input tokens overhead #25

usatenko opened this issue Mar 17, 2025 · 3 comments

Comments

@usatenko
Copy link

from openai import OpenAI
client = OpenAI()

response = client.responses.create(
    model="computer-use-preview",
    tools=[{
        "type": "computer_use_preview",
        "display_width": 1024,
        "display_height": 768,
        "environment": "browser" # other possible values: "mac", "windows", "ubuntu"
    }],
    input=[
        {
            "role": "user",
            "content": "Check the latest OpenAI news on chrome.com."
        }
        # Optional: include a screenshot of the initial state of the environment
        # {
        #     type: "input_image",
        #     image_url: f"data:image/png;base64,{screenshot_base64}"
        # }
    ],
    reasoning={
        "generate_summary": "concise",
    },
    truncation="auto"
)

print(response)

for this code I get the answer:

... status='completed', text=ResponseTextConfig(format=ResponseFormatText(type='text')), truncation='auto', usage=ResponseUsage(input_tokens=990, output_tokens=7, output_tokens_details=OutputTokensDetails(reasoning_tokens=0), total_tokens=997, input_tokens_details={'cached_tokens': 0}), user=None, store=True)

So, if I even do not send a picture, it anyway uses 990 input tokens. With a picture it is up to 3000-4000 tokens.
To process 30 screenshot iterations by this model by the agent it takes 30 * 1000 = 30000 of input tokens overhead (if $3/1 mln tokens = $0.09).
Is it correct?

@katia-openai
Copy link
Collaborator

Thanks for reporting this, this is an issue we're aware of and we're currently looking into. Will keep you posted!

@Everything-In-Sync
Copy link

@katia-openai Hey Katia, I ran it again today and this time it did send over the base64 from the screenshot (im not going to copy and paste all of that text here) which it did not do last time so that part is working, it's just the same output issue from the model: {'error': {'message': 'The model computer-use-preview-2025-03-11 does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

Thank you for the progress

@theonepa1
Copy link

@Everything-In-Sync - ran into same issue. Looks like the model no longer exists.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants