Skip to content

feat: azure adapter and OpenAI Files API uploads - #56

Merged
Im-Beast merged 4 commits into
mainfrom
mateusz/provider-files
Sep 11, 2026
Merged

feat: azure adapter and OpenAI Files API uploads#56
Im-Beast merged 4 commits into
mainfrom
mateusz/provider-files

Conversation

@Im-Beast

@Im-Beast Im-Beast commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
  • Adds azureOpenAIModel, exported as @alphaxiv/agents/azure-openai, sharing the Open Responses adapter and reasoning resolution with openAIModel
  • Adds a fileStore option to both: images and PDFs are uploaded to the provider Files API once and sent as file_id afterwards instead of base64 on every call
  • The store is caller owned and maps a URL to a file id for 7 days; set returns the winning id so racing uploads agree, delete only drops a row still holding the id, and expiry sweeping is the caller's job
  • A rejected file id is handled inside the adapter stream: a stored id is dropped and re-uploaded, an id uploaded in the same call is resent unchanged after a pause, three sends at most, so the Agent retry loop never sees it
  • Adds the request_start stream item, which restarts the first token watchdog after uploads
  • Adds ActiveTrace.update for partial trace content
  • Live tests against OpenAI and Azure are skipped without provider keys

Measured on gpt-5.6-luna with a 2 MB PDF, 25 prompts per arm on my mac, so the download and upload might be slower than on a real deployment.

TTFT:

provider arm median p90 mean
OpenAI base64 3875 4799 3939
OpenAI store, warm 2849 3481 2871
OpenAI store, cold 4601 5612 4732
Azure base64 3929 5763 4297
Azure store, warm 2717 3493 2929
Azure store, cold 4722 8240 5432

Total:

provider arm median p90 mean
OpenAI base64 4629 6066 4784
OpenAI store, warm 3555 4361 3654
OpenAI store, cold 5342 6803 5486
Azure base64 4385 6982 4765
Azure store, warm 3255 4431 3483
Azure store, cold 5132 8607 6090

@Im-Beast
Im-Beast force-pushed the mateusz/provider-files branch from 52e8add to 3a91055 Compare September 10, 2026 11:35
@Im-Beast
Im-Beast merged commit 52d85c4 into main Sep 11, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant