Skip to content

standardize auto generated ids to have 32 characters #1062

Open

Description

@narengogi

What Happened?

In cases like vertex, the tool calls do not have any ids, so portkey generated ids for them.
When a user tried to use one such id to azure in a subsequent call, they got this error

'messages[2].tool_calls[0].id': string too long. Expected a string with maximum length 40, but got a string with length 44 instead.
Becasuse tool call id is: portkey-6aa6db90-1b84-4155-9f32-f658c97d6b1b and its 44 chars long

ref: https://discord.com/channels/1143393887742861333/1143402158394454016/1364908774401249371

What Should Have Happened?

No response

Relevant Code Snippet

No response

Your Twitter/LinkedIn

No response

Activity

  1. narengogi commented on Dec 24, 2025

    @narengogi
    MemberAuthor

    assigning to @sk-portkey

  2. aniketkrs commented on Sep 28, 2026

    @aniketkrs

    Hi, I see this was assigned to @sk-portkey in Dec 2025 and there is no linked PR yet. The Azure >40-char rejection from the issue is still reproducible on current main: 6 sites across src/providers/google/chatComplete.ts and src/providers/google-vertex-ai/chatComplete.ts still generate 'portkey-' + crypto.randomUUID() (44 chars). I would like to pick this up with a minimal fix (32-char dash-stripped UUIDs, no prefix). Happy to step back if it is still in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions