@omp-provider-capabilities/openrouter 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @omp-provider-capabilities/openrouter
|
|
2
|
+
|
|
3
|
+
OpenRouter provider features for OMP: batch execution and server tools.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Batch API**: `/v1/batches` with 50% cost discount (OpenAI-compatible, multi-endpoint)
|
|
8
|
+
- **Server Tools**: Shell, Web Search (beta)
|
|
9
|
+
- **640+ Models**: Access to a wide range of models through OpenRouter
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @omp-provider-capabilities/openrouter @omp-provider-capabilities/core
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { OpenRouterBatchClient } from "@omp-provider-capabilities/openrouter";
|
|
21
|
+
|
|
22
|
+
const batch = new OpenRouterBatchClient({ apiKey: process.env.OPENROUTER_API_KEY });
|
|
23
|
+
|
|
24
|
+
// Submit batch job
|
|
25
|
+
const job = await batch.create({
|
|
26
|
+
model: "anthropic/claude-sonnet-4",
|
|
27
|
+
requests: [{ prompt: "Analyze this..." }]
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Poll for results
|
|
31
|
+
const results = await batch.waitForCompletion(job.id);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Server Tools
|
|
35
|
+
|
|
36
|
+
- **Shell**: Execute shell commands (beta)
|
|
37
|
+
- **Web Search**: Real-time web search (beta)
|
|
38
|
+
|
|
39
|
+
## Batch API
|
|
40
|
+
|
|
41
|
+
- **Endpoint**: `/v1/batches` (multi-endpoint support)
|
|
42
|
+
- **Discount**: 50% off real-time pricing
|
|
43
|
+
- **Status**: Stable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omp-provider-capabilities/openrouter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "OpenRouter provider extension: batch execution, server tools (shell, web search).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"src/",
|
|
24
|
+
"README.md",
|
|
24
25
|
"!src/**/*.test.ts",
|
|
25
26
|
"package.json"
|
|
26
27
|
],
|