Skip to content

Commit ba45778

Browse files
Merge branch 'azure-partner' of https://github.com/Portkey-AI/docs-core into azure-partner
2 parents 938f7c6 + aa396d6 commit ba45778

File tree

8 files changed

+240
-77
lines changed

8 files changed

+240
-77
lines changed

changelog/enterprise.mdx

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,45 @@
11
---
22
title: "Enterprise Gateway"
3-
sidebarTitle: "Enterprise Gateway [1.10.21]"
3+
sidebarTitle: "Enterprise Gateway [1.10.22]"
44
---
55

66
<Card title="Schedule Call" href="https://portkey.sh/demo-21" icon="calendar" horizontal>
77
Discuss how Portkey's AI Gateway can enhance your organization's AI infrastructure
88
</Card>
99

10+
<Update label="1.10.22" description="2025-05-08">
11+
## v1.10.22
12+
---
13+
### Enhanced Anthropic PDF Support
14+
- Added transformation logic to support OpenAI-spec-compatible `file` content parts in request.
15+
- Introduced two new Portkey parameters for the `file` content parts: `file_url` and `mime_type`.
16+
- Applicable for Anthropic, Bedrock-Anthropic and VertexAI-Anthropic models.
17+
- [Docs](/integrations/llms/anthropic#processing-pdfs-with-claude)
18+
19+
### OTEL Configurations
20+
- Added two new environment variables:
21+
- `OTEL_SERVICE_NAME`: Sets the `service.name` resource attribute value.
22+
- `OTEL_RESOURCE_ATTRIBUTES`: Comma-separated `key=value` pairs which will be sent as individual resource attributes.
23+
24+
### New Providers
25+
- **Ncompass**: Supports chat completions endpoint.
26+
- **Lepton**: Supports chat completions, completions and transcriptions endpoints.
27+
- **Snowflake Cortex**: Supports chat completions endpoint.
28+
29+
### Provider Updates
30+
- **Groq**: Handled an exception that occurred when `stream_options` was included in the request, because the response transformer was not handling `usage` chunk mapping as expected.
31+
- **Workers AI**: Added support for `/images/generations` route.
32+
- **Openrouter**: Added support for `usage` request parameter and response mapping.
33+
- **Deepinfra**: Handled `ping` event returned in stream and mapped `usage` field returned in the response.
34+
- **VertexAI**: Now returns 400 (instead of 500) for empty model validation errors.
35+
36+
### Fixes And Improvements
37+
- For providers except OpenAI and Azure-OpenAI, updated the value of `object` field in chat completions response from `chat_completion` to `chat.completion` for OpenAI spec compliance.
38+
- **Proxy (Passthrough) Requests**: Fixed endpoint construction logic, which was affecting a few provider-route combinations.
39+
- **Unified Batches**: Fixed issue where embeddings batch output was being returned as empty.
40+
- **Prometheus**: Fixed issue where `model` label was set as N/A for Bedrock requests.
41+
</Update>
42+
1043
<Update label="1.10.21" description="2025-04-30">
1144
## v1.10.21
1245
---

docs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,6 +2214,10 @@
22142214
{
22152215
"source": "/guides/use-cases/build-a-chatbot-using-portkeys-prompt-templates",
22162216
"destination": "/guides/prompts/build-a-chatbot-using-portkeys-prompt-templates"
2217+
},
2218+
{
2219+
"source": "/integrations/tools/exa",
2220+
"destination": "/integrations/plugins/exa"
22172221
}
22182222
],
22192223
"seo": {

images/product/logs-export-1.png

547 KB
Loading

images/product/logs-export-2.png

508 KB
Loading

integrations/llms/anthropic.mdx

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,20 @@ Currently, Portkey supports PDF processing using base64-encoded PDF documents, f
490490
"text": "What are the key findings in this document?"
491491
},
492492
{
493-
"type": "image_url",
494-
"image_url": {
495-
"url": pdf_data
496-
}
493+
"type": "file",
494+
"file": {
495+
# "file_url": "https://pdfobject.com/pdf/sample.pdf", # if you want to pass a pdf file from a url
496+
"mime_type": "application/pdf",
497+
"file_data": "BASE64_PDF_DATA"
498+
}
497499
}
500+
# { # if you want to pass a plain text file
501+
# "type": "file",
502+
# "file": {
503+
# "mime_type": "text/plain",
504+
# "file_data": "This is a plain text file"
505+
# }
506+
# }
498507
]
499508
}
500509
]
@@ -544,11 +553,20 @@ Currently, Portkey supports PDF processing using base64-encoded PDF documents, f
544553
text: "What are the key findings in this document?"
545554
},
546555
{
547-
type: "image_url",
548-
image_url: {
549-
url: pdfData
556+
type: "file",
557+
file: {
558+
mime_type: "application/pdf",
559+
file_data: pdfData,
560+
// file_url: "https://pdfobject.com/pdf/sample.pdf" // if you want to pass a pdf file from a url
550561
}
551-
}
562+
},
563+
// { // if you want to pass a plain text file
564+
// "type": "file",
565+
// "file": {
566+
// "mime_type": "text/plain",
567+
// "file_data": "This is a plain text file"
568+
// }
569+
// }
552570
]
553571
}
554572
]
@@ -591,11 +609,19 @@ Currently, Portkey supports PDF processing using base64-encoded PDF documents, f
591609
"text": "What are the key findings in this document?"
592610
},
593611
{
594-
"type": "image_url",
595-
"image_url": {
596-
"url": "data:application/pdf;base64,'$PDF_BASE64'"
612+
"type": "file",
613+
"file": {
614+
"mime_type": "application/pdf",
615+
"file_data": "BASE64_PDF_DATA"
597616
}
598617
}
618+
// { // if you want to pass a plain text file
619+
// "type": "file",
620+
// "file": {
621+
// "mime_type": "text/plain",
622+
// "file_data": "This is a plain text file"
623+
// }
624+
// }
599625
]
600626
}
601627
]
@@ -604,10 +630,6 @@ Currently, Portkey supports PDF processing using base64-encoded PDF documents, f
604630
</Tab>
605631
</Tabs>
606632
607-
<Note>
608-
We are currently working on enabling direct URL-based PDF support for Anthropic. Stay tuned for updates!
609-
</Note>
610-
611633
612634
### Best Practices for PDF Processing
613635

integrations/plugins/exa.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ This process allows any LLM to respond with up-to-date knowledge without retrain
7070

7171
* Save this config and note its Config ID for use in your requests
7272

73+
74+
<Note>
75+
The Exa Plugin is supported only as an `input guardrail`. It adds web search results to your request before it reaches the LLM, which is why only `before_request_hooks` are supported and not `after_request_hooks` on Portkey's gateway. [Learn more about guardrails here](/product/guardrails)
76+
</Note>
77+
7378
### 4. Use the Config in Your Requests
7479

7580
<Tabs>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: "(DEPRECATED) Logs Export"
3+
description: "Easily access your Portkey logs data for further analysis and reporting"
4+
---
5+
6+
<Info>
7+
Logs export feature is only available for [**Production**](https://portkey.ai/pricing) and [**Enterprise**](https://portkey.ai/docs/product/enterprise-offering) users.
8+
</Info>
9+
10+
<Note>
11+
Portkey offers an in-app logs export feature that is not generally available yet. If you're interested in early access, contact us at [email protected].
12+
</Note>
13+
14+
At Portkey, we understand the importance of data analysis and reporting for businesses and teams. That's why we provide a comprehensive logs export feature for our paid users. With this feature, you can easily request and obtain your Portkey logs data in a **structured JSON** format, allowing you to gain valuable insights into your LLM usage, performance, costs, and more.
15+
16+
## Requesting Logs Export
17+
18+
To submit a data export request, simply follow these steps:
19+
20+
1. Ensure you are an admin of your organization on Portkey.
21+
2. Send an email to [[email protected]](mailto:[email protected]) with the subject line `Logs Export - [Your_Organization_Name]`.
22+
3. In the email body,
23+
* Specify the **time frame** for which you require the logs data. **Pro plan** supports logs export of **last 30** days.
24+
* Share names of the **specific columns** you require (see the "[Exported Data](/product/observability/logs-export#exported-data)" section below for a complete list of available columns).
25+
4. Our team will process your request and provide you with the exported logs data in JSON format.
26+
27+
<Note>
28+
Note: Portkey only supports data exports in the `JSONL` format, and can not process exports in any other formats at the moment.
29+
</Note>
30+
31+
## Exported Data
32+
33+
The exported logs data will include the following columns:
34+
35+
| Column Name | Column Description / Property |
36+
| ---------------------- | --------------------------------------------------------- |
37+
| created\_at | Timestamp of the request |
38+
| request.body | Request JSON payload (as seen in the Portkey logs) |
39+
| response.body | Response JSON payload (as seen in the Portkey logs) |
40+
| is\_success | Request success status (1 = success, 0 = failure) |
41+
| ai\_org | AI provider name |
42+
| ai\_model | AI model name |
43+
| req\_units | Number of tokens in the request |
44+
| res\_units | Number of tokens in the response |
45+
| total\_units | Total number of tokens (request + response) |
46+
| cost | Cost of the request in cents (USD) |
47+
| cost\_currency | Currency of the cost (USD) |
48+
| request\_url | Final provider API URL |
49+
| request\_method | HTTP request method |
50+
| response\_status\_code | HTTP response status code |
51+
| response\_time | Response time in milliseconds |
52+
| cache\_status | Cache status (SEMANTIC HIT, HIT, MISS, DISABLED) |
53+
| cache\_type | Cache type (SIMPLE, SEMANTIC) |
54+
| stream\_mode | Stream mode status (TRUE, FALSE) |
55+
| retry\_success\_count | Number of retries after which request was successful |
56+
| trace\_id | Trace ID for the request |
57+
| mode | Config top level strategy (SINGLE, FALLBACK, LOADBALANCE) |
58+
| virtual\_key | Virtual key used for the request |
59+
| runtime | Runtime environment |
60+
| runtime\_version | Runtime environment version |
61+
| sdk\_version | Portkey SDK version |
62+
| config | Config ID used for the request |
63+
| prompt\_slug | Prompt ID used for the request |
64+
| prompt\_version\_id | Version number of the prompt template slug |
65+
| metadata.key | Custom metadata key |
66+
| metadata.value | Custom metadata value |
67+
68+
With this comprehensive data, you can analyze your API usage patterns, monitor performance, optimize costs, and make data-driven decisions for your business or team.
69+
70+
## Support
71+
72+
If you have any questions or need assistance with the logs export feature, reach out to the Portkey team at [email protected] or hop on to our [Discord server](https://portkey.ai/community).

0 commit comments

Comments
 (0)