Skip to content

fix(core): normalize pi-sdk azure base url#932

Merged
christso merged 1 commit intomainfrom
fix/931-pi-sdk-azure-endpoint
Apr 4, 2026
Merged

fix(core): normalize pi-sdk azure base url#932
christso merged 1 commit intomainfrom
fix/931-pi-sdk-azure-endpoint

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 4, 2026

Summary

  • normalize bare Azure resource names to OpenAI-compatible HTTPS /openai/v1 base URLs for the pi-coding-agent SDK path
  • apply the normalized URL both to SDK env wiring and to the model object passed into createAgentSession
  • add focused tests for the Azure normalization helper and the PiCodingAgentProvider env mapping
  • clarify AGENTS.md so future feature work starts from a fresh worktree based on latest origin/main

Red

  • On origin/main in this worktree, a real Azure-backed repro failed with:
    • pi-coding-agent SDK error (provider: openai, model: gpt-5.4-mini): "leos-m6pmw8kz-eastus2/responses" cannot be parsed as a URL.
  • Command:
    • GRADER_TARGET=azure bun apps/cli/src/cli.ts eval run examples/features/deterministic-evaluators/evals/dataset.eval.yaml --test-id equals-exact --target pi-sdk-azure
  • Focused red test:
    • bun test packages/core/test/evaluation/providers/pi-coding-agent.test.ts

Green

  • Focused tests:
    • bun test packages/core/test/evaluation/providers/pi-coding-agent.test.ts packages/core/test/evaluation/providers/pi-provider-aliases.test.ts
  • Real eval:
    • GRADER_TARGET=azure bun apps/cli/src/cli.ts eval run examples/features/deterministic-evaluators/evals/dataset.eval.yaml --test-id equals-exact --target pi-sdk-azure
    • Result: 1/1 passed, mean 1.000
  • Repo checks:
    • bun run build
    • bun run test
    • bun run lint

Closes #931

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0e2d306
Status: ✅  Deploy successful!
Preview URL: https://15921772.agentv.pages.dev
Branch Preview URL: https://fix-931-pi-sdk-azure-endpoin.agentv.pages.dev

View logs

@christso christso merged commit f9b5cdc into main Apr 4, 2026
4 checks passed
@christso christso deleted the fix/931-pi-sdk-azure-endpoint branch April 4, 2026 09:19
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.

pi-sdk-azure: Azure endpoint is treated as an invalid URL in SDK target

1 participant