Skip to content

Commit b5da586

Browse files
committed
feat(client): append random suffix to client_id in demo mode
1 parent eea0355 commit b5da586

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

axonflow/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import logging
3333
import os
3434
import re
35+
import secrets
3536
from collections.abc import AsyncIterator, Coroutine, Iterator
3637
from dataclasses import dataclass
3738
from datetime import datetime
@@ -369,6 +370,7 @@ def __init__(
369370
if not client_id:
370371
msg = "client_id is required in demo mode (AXONFLOW_DEMO=1)"
371372
raise TypeError(msg)
373+
client_id = f"{client_id}-{secrets.token_hex(3)}"
372374

373375
if isinstance(mode, str):
374376
mode = Mode(mode)

0 commit comments

Comments
 (0)