Skip to content

Commit 909ba4d

Browse files
Simplify OpenRouter SDK prompt-caching README to link to main docs
1 parent a6b125e commit 909ba4d

File tree

1 file changed

+20
-19
lines changed
  • typescript/openrouter-sdk/src/prompt-caching

1 file changed

+20
-19
lines changed
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
# Anthropic Prompt Caching Examples (OpenRouter SDK)
1+
# Prompt Caching Examples (OpenRouter SDK)
22

3-
**TODO**: Add prompt caching examples using the @openrouter/sdk package.
3+
Examples demonstrating prompt caching with @openrouter/sdk.
44

5-
This directory will contain examples demonstrating Anthropic's prompt caching feature via the OpenRouter TypeScript SDK.
5+
## Documentation
66

7-
## Placeholder
7+
For full prompt caching documentation including all providers, pricing, and configuration details, see:
8+
- **[Prompt Caching Guide](../../../../docs/prompt-caching.md)**
89

9-
Examples will be added in a future commit.
10+
## Status
1011

11-
## Expected Structure
12+
**TODO**: Examples coming soon. This directory will contain:
13+
- `user-message-cache.ts` - Cache large context in user messages
14+
- `multi-message-cache.ts` - Cache system prompt across multi-turn conversations
15+
- `no-cache-control.ts` - Control scenario (validates methodology)
1216

13-
```
14-
prompt-caching/
15-
├── README.md # This file
16-
├── system-message-cache.ts # TODO: Cache on system message
17-
├── user-message-cache.ts # TODO: Cache on user message
18-
├── multi-message-cache.ts # TODO: Cache in conversation
19-
└── no-cache-control.ts # TODO: Control scenario
20-
```
17+
## Expected Usage
2118

22-
## Pattern (To Be Implemented)
19+
```typescript
20+
import OpenRouter from '@openrouter/sdk';
2321

24-
The examples will use the official @openrouter/sdk package to demonstrate:
25-
- How to configure cache_control with the SDK
26-
- Where cache metrics appear in responses
27-
- Evidence-based verification of cache behavior
22+
const openrouter = new OpenRouter({
23+
apiKey: process.env.OPENROUTER_API_KEY,
24+
});
25+
26+
// Configuration and cache_control usage pattern will be documented
27+
// when examples are implemented
28+
```

0 commit comments

Comments
 (0)