Repository navigation
Conversation
…handoff spec Adds the Gateway-only, Temporal-only design for per-request Portkey keys and, beside it, a spec-style handoff for the hosted-plane half (pipelex-server): the runtime contract it builds against, what to build where (platform stamping, a resolver plugin member, provisioning, config/IAM/deploy), tests, corrections to the design's assumptions about the hosted topology, and the decisions still open. Also adds a skimmable HTML version of the handoff. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3napiozmUbwpQBF7U6r53
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Docs-only PR under
wip/api_keys/. No code changes. It captures the study and design for giving each hosted run its own Portkey gateway key, and the handoff spec for thepipelex-serverhalf of that work.sdk-per-request-key-survey.md— where the API key is bound today (TOML placeholder → secrets provider →InferenceBackend→ cached SDK client) and, per SDK we ship, whether the key can be overridden on the request rather than the client. Verified by executing the pinned versions against a recordinghttpx.MockTransport.gateway-per-request-key-under-temporal.md— the narrowed design: Gateway-only, holds under our Temporal plugin. Reference (never material) rides onJobMetadata; aGatewayKeyResolverseam in the gateway plugin, defaulting to today's behaviour; theAsyncOpenAIvsAsyncPortkeyoverride mechanics, including thepost(headers=…)trap on the Portkey client that would pass review while sending the boot key.pipelex-server-per-request-gateway-key-handoff.md— spec for the hosted plane: the runtime contract, what to build where (platform stamps the reference on both runner hops, a new resolver plugin member, provisioning, config/IAM/deploy), tests, and the open decisions. Corrects two design assumptions after checkingpipelex-serverdev: the runner never seesX-Org-Id(the platform fronts every/v1/*route and dispatches itself), and per-user Portkey keys already exist and now carry paid top-up credit.…handoff.html— a skimmable HTML version of the handoff that points at the.mdfor details.wip/google-structured-config-dropped-and-vertex-token-stale.md— two unrelated inference-provider bugs noticed during the survey, filed for later; not designed or fixed here.Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q3napiozmUbwpQBF7U6r53
Summary by cubic
Documents the design for per-request Portkey Gateway keys under Temporal and a
pipelex-serverhandoff; no code changes. Today all hosted runs share one Gateway key; the design moves to a per-request key resolved from a reference onJobMetadatato enable per-tenant attribution, budgets, and limits.sdk-per-request-key-survey.md: where keys bind today and per-SDK override seams. Key trap:AsyncPortkey.post(headers=…)does not override auth; usewith_options(api_key=…).openaipaths acceptextra_headers.gateway-per-request-key-under-temporal.md: narrow design. Introduces agateway_key_refonJobMetadataand aGatewayKeyResolverseam (default falls back to the boot key). All six Gateway handles override per request; retries re-resolve on any worker. No changes toSdkClientRegistry,InferenceManager, orinstructor.pipelex-server-per-request-gateway-key-handoff.{md,html}: hosted implementation. Platform stampsgateway_key_refon run dispatch payloads and setsX-Gateway-Key-Refon/build/*; runner threads it toJobMetadata. New resolver member installed in bothapi-hostedandworkerreads the tenant’s key (DynamoDB), with a process TTL LRU cache. Config switch for missing-reference policy; IAM read grants (and optional KMS decrypt). Corrects two assumptions: the runner never seesX-Org-Id; per-user Portkey keys already exist and carry paid credit.wip/google-structured-config-dropped-and-vertex-token-stale.md: files two unrelated defects found during the survey (Gemini structured config dropped viainstructor, Vertex token minted once and never refreshed).Decisions for reviewers
pipelexbumps.Written for commit eae7d76. Summary will update on new commits.