Skip to content

Commit d82538c

Browse files
committed
merge main
2 parents f7a9dba + 3dc26c4 commit d82538c

File tree

34 files changed

+1195
-128
lines changed

34 files changed

+1195
-128
lines changed

.husky/pre-push

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
protected_branch='main'
3+
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
4+
5+
if [ "$current_branch" = "$protected_branch" ]; then
6+
echo "🚫 Direct push to main blocked!"
7+
echo "Create a feature branch and open a PR instead."
8+
exit 1
9+
fi
10+
11+
exit 0

CLAUDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,18 @@ className="bg-background text-foreground border-border"
169169
- Test in both light and dark modes
170170
- when making changes to /packages run the tests npx jest **tests**/ in /packages to make sure nothing else is broken
171171

172+
### TypeScript Type Changes
173+
174+
When modifying TypeScript types (interfaces, type aliases, union types):
175+
176+
1. **Run type checking before committing**: `npx tsc --noEmit` in the relevant package to catch type errors (Jest tests alone won't catch all type mismatches)
177+
2. **Search for related types**: When updating union types (e.g., `"low" | "medium" | "high"`), grep for similar patterns to ensure all related types are updated:
178+
```bash
179+
grep -r "thinkingLevel" packages/ # Find all usages of similar type
180+
```
181+
3. **Check cross-package dependencies**: Types in `/packages/` are often used across multiple packages (llm-mapper, prompts, cost). Verify changes don't break consumers.
182+
4. **Run the full build**: For `/packages/` changes, run `cd web && yarn build` or check Vercel preview to catch type errors across the monorepo.
183+
172184
# Helicone Design System Guidelines
173185

174186
## Core Principles

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@
324324
"rest/request/post-v1requestquery-clickhouse",
325325
"rest/request/post-v1requestquery",
326326
"rest/request/get-v1request",
327+
"rest/request/get-v1request-inputs",
327328
"rest/request/post-v1requestquery-ids",
328329
"rest/request/post-v1request-feedback",
329330
"rest/request/put-v1request-property",
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "Get Request Inputs"
3+
sidebarTitle: "Get Request Inputs"
4+
description: "Retrieve the prompt template inputs (variables) used for a specific request made through AI Gateway prompt management."
5+
"twitter:title": "Get Request Inputs - Helicone OSS LLM Observability"
6+
openapi: get /v1/request/{requestId}/inputs
7+
---
8+
9+
import EUAPIWarning from "/snippets/eu-api-warning.mdx";
10+
11+
<EUAPIWarning />
12+
13+
## Overview
14+
15+
When you use [Prompt Management](/features/advanced-usage/prompts/overview) through the AI Gateway, template variables (inputs) are stored automatically. This endpoint lets you retrieve those inputs by request ID — useful for building testing pipelines that replay past requests against new prompt versions.
16+
17+
## Use Cases
18+
19+
- **Regression testing**: Pull a past request's inputs and replay them against a new prompt version to validate behavior.
20+
- **Prompt comparison**: Compare outputs across prompt versions using the same inputs, without storing inputs separately on your end.
21+
- **Debugging**: Inspect the exact variables that were injected into a prompt template at runtime.
22+
23+
<Note>Request data is retained for 90 days. Plan your testing workflows accordingly.</Note>
24+
25+
## Response
26+
27+
Returns `null` for `data` if the request has no associated inputs (e.g., the request was not made through prompt management, or the request ID doesn't exist).
28+
29+
### Example Response
30+
31+
```json
32+
{
33+
"data": {
34+
"inputs": {
35+
"customer_name": "Sarah",
36+
"issue": "refund request"
37+
},
38+
"prompt_id": "customer-support",
39+
"version_id": "1c7a86c8-...",
40+
"environment": "production"
41+
},
42+
"error": null
43+
}
44+
```
45+
46+
### No Inputs Found
47+
48+
```json
49+
{
50+
"data": null,
51+
"error": null
52+
}
53+
```

0 commit comments

Comments
 (0)