Skip to content

Outdated max_token in API request #2

Description

@iamyifan

Hi developers, thanks for this awesome tool.

I tried using latest GPT-5.x models and the current code in delean-batch-manager/src/delean_batch_manager/core/batching/files.py still uses max_tokens instead of max_completion_tokens, and the temperature is hard coded as 0 which will fail for GPT-5-mini/nano and etc. models.

For anyone who wants a quick ad-hoc fix, replace the snippet in files.py:

request = {
                    "custom_id": row['custom_id'],
                    "method": "POST",
                    "url": body_url,
                    "body": {
                        "model": openai_model,
                        "messages": [
                            system_message,
                            {
                                "role": "user",
                                "content": full_prompt
                            }
                        ],
                        "max_completion_tokens": max_completion_tokens,  # max_tokens -> max_completion_tokens
                        "temperature": 1  # hard-coded to 1
                    },
                }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions