Repository navigation
Feat/azure foundry anthropic messages paths - #165
Merged
swapnilroy-cell merged 2 commits intoOct 19, 2026
Merged
Conversation
Add the two workspace-scope query parameters (include_all_workspaces, exclude_workspace_slugs) as shared OpenAPI components and reference them alongside workspace_slug on all analytics graphs/groups/summary endpoints. These control org-key analytics scope across workspaces and were previously undocumented, causing AB03 permission errors when misused as workspace_slug values. Co-authored-by: Cursor <cursoragent@cursor.com>
Add /messages and /messages/count_tokens paths to the OpenAPI spec. These paths proxy the native Anthropic Messages API and are already fully implemented in the gateway (azure-ai-inference provider). Changes: - Add 'Messages' tag to the tags section - Add POST /messages path with CreateMessageRequest/Response schemas - Add POST /messages/count_tokens path with CountMessageTokensRequest/Response schemas - Add all Anthropic content block schemas (text, image, document, tool_use, tool_result, thinking, redacted_thinking) - Add navigation group entry for the Messages section - Document Azure AI Foundry usage: strip azure_foundry_url to /anthropic (not /anthropic/v1/messages); no api-version or deployment-name required - Include code samples for cURL, Python (Anthropic SDK), JS (Anthropic SDK) Co-authored-by: Cursor <cursoragent@cursor.com>
kiran-4444
approved these changes
Oct 19, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Duplicate identifiers invalidate the specification, and workspace filtering and Messages contracts need correction.
5 open issues
What changed in this PR
Extends Portkey’s OpenAPI specification with Anthropic-native Messages endpoints, including Azure AI Foundry guidance, and cross-workspace analytics filters.
Changes:
- Adds Messages and token-counting endpoints, schemas, examples, and navigation.
- Documents Azure AI Foundry provider configuration.
- Adds workspace aggregation and exclusion filters to 22 analytics operations.
| File | Description |
|---|---|
| openapi.yaml | Defines Messages APIs and expands analytics workspace filtering. |
Review effort: Balanced
| /messages: | ||
| servers: *DataPlaneServers | ||
| post: | ||
| operationId: createMessage |
Comment on lines
+24017
to
+24029
| media_type: | ||
| type: string | ||
| enum: [application/pdf, text/plain] | ||
| description: Required when type is base64. | ||
| data: | ||
| type: string | ||
| description: Base64-encoded document data. Required when type is base64. | ||
| url: | ||
| type: string | ||
| description: URL of the document. Required when type is url. | ||
| text: | ||
| type: string | ||
| description: Plain text content. Required when type is text. |
| type: integer | ||
| description: Max tokens for thinking. Required when type is enabled. | ||
|
|
||
| CreateMessageRequest: |
Comment on lines
+358
to
+360
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/CreateMessageResponse" |
| name: include_all_workspaces | ||
| schema: | ||
| type: boolean | ||
| description: When `true`, returns data aggregated across all workspaces in the organisation. Only takes effect for organisation API keys; ignored for workspace API keys, which are already scoped to a single workspace. Do not combine with `workspace_slug` — if `workspace_slug` is present, it takes precedence and this parameter is ignored. One of `workspace_slug`, `include_all_workspaces`, or `exclude_workspace_slugs` is required. |
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.


No description provided.