@keystrokehq/openrouter 0.1.0
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 +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/create-chat-completion.cjs +81 -0
- package/dist/actions/create-chat-completion.cjs.map +1 -0
- package/dist/actions/create-chat-completion.d.cts +9 -0
- package/dist/actions/create-chat-completion.d.cts.map +1 -0
- package/dist/actions/create-chat-completion.d.mts +9 -0
- package/dist/actions/create-chat-completion.d.mts.map +1 -0
- package/dist/actions/create-chat-completion.mjs +80 -0
- package/dist/actions/create-chat-completion.mjs.map +1 -0
- package/dist/actions/create-coinbase-charge.cjs +33 -0
- package/dist/actions/create-coinbase-charge.cjs.map +1 -0
- package/dist/actions/create-coinbase-charge.d.cts +9 -0
- package/dist/actions/create-coinbase-charge.d.cts.map +1 -0
- package/dist/actions/create-coinbase-charge.d.mts +9 -0
- package/dist/actions/create-coinbase-charge.d.mts.map +1 -0
- package/dist/actions/create-coinbase-charge.mjs +32 -0
- package/dist/actions/create-coinbase-charge.mjs.map +1 -0
- package/dist/actions/create-message.cjs +91 -0
- package/dist/actions/create-message.cjs.map +1 -0
- package/dist/actions/create-message.d.cts +9 -0
- package/dist/actions/create-message.d.cts.map +1 -0
- package/dist/actions/create-message.d.mts +9 -0
- package/dist/actions/create-message.d.mts.map +1 -0
- package/dist/actions/create-message.mjs +90 -0
- package/dist/actions/create-message.mjs.map +1 -0
- package/dist/actions/get-credits.cjs +20 -0
- package/dist/actions/get-credits.cjs.map +1 -0
- package/dist/actions/get-credits.d.cts +9 -0
- package/dist/actions/get-credits.d.cts.map +1 -0
- package/dist/actions/get-credits.d.mts +9 -0
- package/dist/actions/get-credits.d.mts.map +1 -0
- package/dist/actions/get-credits.mjs +19 -0
- package/dist/actions/get-credits.mjs.map +1 -0
- package/dist/actions/get-current-key.cjs +44 -0
- package/dist/actions/get-current-key.cjs.map +1 -0
- package/dist/actions/get-current-key.d.cts +9 -0
- package/dist/actions/get-current-key.d.cts.map +1 -0
- package/dist/actions/get-current-key.d.mts +9 -0
- package/dist/actions/get-current-key.d.mts.map +1 -0
- package/dist/actions/get-current-key.mjs +43 -0
- package/dist/actions/get-current-key.mjs.map +1 -0
- package/dist/actions/get-generation.cjs +45 -0
- package/dist/actions/get-generation.cjs.map +1 -0
- package/dist/actions/get-generation.d.cts +9 -0
- package/dist/actions/get-generation.d.cts.map +1 -0
- package/dist/actions/get-generation.d.mts +9 -0
- package/dist/actions/get-generation.d.mts.map +1 -0
- package/dist/actions/get-generation.mjs +44 -0
- package/dist/actions/get-generation.mjs.map +1 -0
- package/dist/actions/get-models-count.cjs +20 -0
- package/dist/actions/get-models-count.cjs.map +1 -0
- package/dist/actions/get-models-count.d.cts +9 -0
- package/dist/actions/get-models-count.d.cts.map +1 -0
- package/dist/actions/get-models-count.d.mts +9 -0
- package/dist/actions/get-models-count.d.mts.map +1 -0
- package/dist/actions/get-models-count.mjs +19 -0
- package/dist/actions/get-models-count.mjs.map +1 -0
- package/dist/actions/index.cjs +27 -0
- package/dist/actions/index.d.cts +14 -0
- package/dist/actions/index.d.mts +14 -0
- package/dist/actions/index.mjs +14 -0
- package/dist/actions/list-available-models.cjs +81 -0
- package/dist/actions/list-available-models.cjs.map +1 -0
- package/dist/actions/list-available-models.d.cts +9 -0
- package/dist/actions/list-available-models.d.cts.map +1 -0
- package/dist/actions/list-available-models.d.mts +9 -0
- package/dist/actions/list-available-models.d.mts.map +1 -0
- package/dist/actions/list-available-models.mjs +80 -0
- package/dist/actions/list-available-models.mjs.map +1 -0
- package/dist/actions/list-embedding-models.cjs +53 -0
- package/dist/actions/list-embedding-models.cjs.map +1 -0
- package/dist/actions/list-embedding-models.d.cts +9 -0
- package/dist/actions/list-embedding-models.d.cts.map +1 -0
- package/dist/actions/list-embedding-models.d.mts +9 -0
- package/dist/actions/list-embedding-models.d.mts.map +1 -0
- package/dist/actions/list-embedding-models.mjs +52 -0
- package/dist/actions/list-embedding-models.mjs.map +1 -0
- package/dist/actions/list-model-endpoints.cjs +51 -0
- package/dist/actions/list-model-endpoints.cjs.map +1 -0
- package/dist/actions/list-model-endpoints.d.cts +9 -0
- package/dist/actions/list-model-endpoints.d.cts.map +1 -0
- package/dist/actions/list-model-endpoints.d.mts +9 -0
- package/dist/actions/list-model-endpoints.d.mts.map +1 -0
- package/dist/actions/list-model-endpoints.mjs +50 -0
- package/dist/actions/list-model-endpoints.mjs.map +1 -0
- package/dist/actions/list-providers.cjs +21 -0
- package/dist/actions/list-providers.cjs.map +1 -0
- package/dist/actions/list-providers.d.cts +9 -0
- package/dist/actions/list-providers.d.cts.map +1 -0
- package/dist/actions/list-providers.d.mts +9 -0
- package/dist/actions/list-providers.d.mts.map +1 -0
- package/dist/actions/list-providers.mjs +20 -0
- package/dist/actions/list-providers.mjs.map +1 -0
- package/dist/actions/list-user-models.cjs +57 -0
- package/dist/actions/list-user-models.cjs.map +1 -0
- package/dist/actions/list-user-models.d.cts +9 -0
- package/dist/actions/list-user-models.d.cts.map +1 -0
- package/dist/actions/list-user-models.d.mts +9 -0
- package/dist/actions/list-user-models.d.mts.map +1 -0
- package/dist/actions/list-user-models.mjs +56 -0
- package/dist/actions/list-user-models.mjs.map +1 -0
- package/dist/actions/list-zdr-endpoints.cjs +55 -0
- package/dist/actions/list-zdr-endpoints.cjs.map +1 -0
- package/dist/actions/list-zdr-endpoints.d.cts +9 -0
- package/dist/actions/list-zdr-endpoints.d.cts.map +1 -0
- package/dist/actions/list-zdr-endpoints.d.mts +9 -0
- package/dist/actions/list-zdr-endpoints.d.mts.map +1 -0
- package/dist/actions/list-zdr-endpoints.mjs +54 -0
- package/dist/actions/list-zdr-endpoints.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.mjs +17 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @keystrokehq/openrouter
|
|
2
|
+
|
|
3
|
+
Keystroke-managed integration.
|
|
4
|
+
|
|
5
|
+
**App:** `openrouter`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 13
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { openrouterCreateChatCompletion } from "@keystrokehq/openrouter/actions";
|
|
12
|
+
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "openrouter-agent",
|
|
15
|
+
tools: [openrouterCreateChatCompletion],
|
|
16
|
+
});
|
|
17
|
+
```
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_app = require("./app.cjs");
|
|
2
|
+
const require_execute = require("./execute.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return require_app.openrouter.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await require_execute.executeOpenrouterTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.action = action;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["openrouter","executeOpenrouterTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { openrouter } from \"./app\";\nimport { executeOpenrouterTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return openrouter.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeOpenrouterTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,WAAW,OAAO;EACvB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,sBAAsB,MAAM,KAAgC,CAAC;EAC7F;CACF,CAAC;AACH"}
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { openrouter } from "./app.mjs";
|
|
2
|
+
import { executeOpenrouterTool } from "./execute.mjs";
|
|
3
|
+
import "zod";
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return openrouter.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await executeOpenrouterTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { action };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { openrouter } from \"./app\";\nimport { executeOpenrouterTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return openrouter.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeOpenrouterTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,WAAW,OAAO;EACvB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,sBAAsB,MAAM,KAAgC,CAAC;EAC7F;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-chat-completion.ts
|
|
4
|
+
const OpenrouterCreateChatCompletionInput = zod.z.object({
|
|
5
|
+
n: zod.z.number().int().describe("Number of completion choices to generate.").optional(),
|
|
6
|
+
stop: zod.z.union([zod.z.string(), zod.z.array(zod.z.string())]).optional(),
|
|
7
|
+
user: zod.z.string().describe("A unique identifier for the end-user to help detect abuse.").optional(),
|
|
8
|
+
model: zod.z.string().describe("ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures."),
|
|
9
|
+
top_p: zod.z.number().describe("Nucleus sampling probability, between 0 and 1.").optional(),
|
|
10
|
+
stream: zod.z.boolean().default(false).describe("Whether to stream back partial message deltas.").optional(),
|
|
11
|
+
messages: zod.z.array(zod.z.object({
|
|
12
|
+
role: zod.z.enum([
|
|
13
|
+
"system",
|
|
14
|
+
"user",
|
|
15
|
+
"assistant",
|
|
16
|
+
"tool"
|
|
17
|
+
]).describe("Role of the message sender."),
|
|
18
|
+
content: zod.z.string().describe("Content of the message.")
|
|
19
|
+
})).describe("List of conversation messages to provide as context."),
|
|
20
|
+
functions: zod.z.array(zod.z.object({
|
|
21
|
+
name: zod.z.string().describe("Name of the function to be called by the model."),
|
|
22
|
+
parameters: zod.z.record(zod.z.string(), zod.z.unknown()).describe("JSON schema describing function parameters."),
|
|
23
|
+
description: zod.z.string().describe("Description of the function purpose.").optional()
|
|
24
|
+
})).describe("List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.").optional(),
|
|
25
|
+
logit_bias: zod.z.object({}).describe("Adjust the likelihood of specified tokens.").optional(),
|
|
26
|
+
max_tokens: zod.z.number().int().describe("Maximum number of tokens to generate.").optional(),
|
|
27
|
+
temperature: zod.z.number().describe("Sampling temperature to use, between 0 and 2.").optional(),
|
|
28
|
+
function_call: zod.z.union([zod.z.enum(["none", "auto"]), zod.z.object({})]).optional(),
|
|
29
|
+
presence_penalty: zod.z.number().describe("Penalty for new tokens based on presence in the text so far.").optional(),
|
|
30
|
+
frequency_penalty: zod.z.number().describe("Penalty for new tokens based on frequency in the text so far.").optional()
|
|
31
|
+
});
|
|
32
|
+
const OpenrouterCreateChatCompletion_UsageSchema = zod.z.object({
|
|
33
|
+
total_tokens: zod.z.number().int().describe("Total number of tokens used."),
|
|
34
|
+
prompt_tokens: zod.z.number().int().describe("Number of tokens in the prompt."),
|
|
35
|
+
completion_tokens: zod.z.number().int().describe("Number of tokens generated in the completion.")
|
|
36
|
+
});
|
|
37
|
+
const OpenrouterCreateChatCompletion_ErrorResponseSchema = zod.z.object({
|
|
38
|
+
code: zod.z.number().int().describe("Error code from the provider."),
|
|
39
|
+
message: zod.z.string().describe("Error message from the provider."),
|
|
40
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Additional error information.").nullable().optional()
|
|
41
|
+
});
|
|
42
|
+
const OpenrouterCreateChatCompletion_FunctionCallSchema = zod.z.object({
|
|
43
|
+
name: zod.z.string().describe("Name of the function called by the model."),
|
|
44
|
+
arguments: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Arguments provided to the function call.")
|
|
45
|
+
});
|
|
46
|
+
const OpenrouterCreateChatCompletion_ToolCallSchema = zod.z.object({
|
|
47
|
+
id: zod.z.string().describe("Unique identifier for this tool call."),
|
|
48
|
+
type: zod.z.string().describe("Type of the call (function)."),
|
|
49
|
+
"function": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable()
|
|
50
|
+
});
|
|
51
|
+
const OpenrouterCreateChatCompletion_ChoiceMessageSchema = zod.z.object({
|
|
52
|
+
role: zod.z.string().describe("Role of the generated message content."),
|
|
53
|
+
content: zod.z.string().describe("Content of the generated message.").nullable().optional(),
|
|
54
|
+
tool_calls: zod.z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe("Tool calls triggered by the model.").nullable().optional()
|
|
55
|
+
});
|
|
56
|
+
const OpenrouterCreateChatCompletion_CreateChoiceSchema = zod.z.object({
|
|
57
|
+
error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),
|
|
58
|
+
message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),
|
|
59
|
+
finish_reason: zod.z.string().describe("The reason why the completion finished.").nullable().optional(),
|
|
60
|
+
native_finish_reason: zod.z.string().describe("Provider-specific finish reason.").nullable().optional()
|
|
61
|
+
});
|
|
62
|
+
const OpenrouterCreateChatCompletionOutput = zod.z.object({
|
|
63
|
+
id: zod.z.string().describe("Unique identifier for the completion."),
|
|
64
|
+
model: zod.z.string().describe("Model ID used for the completion."),
|
|
65
|
+
usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),
|
|
66
|
+
object: zod.z.enum(["chat.completion", "chat.completion.chunk"]).describe("Object type returned."),
|
|
67
|
+
choices: zod.z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe("List of generated completion choices."),
|
|
68
|
+
created: zod.z.number().int().describe("Unix timestamp when the completion was created."),
|
|
69
|
+
system_fingerprint: zod.z.string().describe("Provider fingerprint if supported.").nullable().optional()
|
|
70
|
+
});
|
|
71
|
+
const openrouterCreateChatCompletion = require_action.action("OPENROUTER_CREATE_CHAT_COMPLETION", {
|
|
72
|
+
slug: "openrouter-create-chat-completion",
|
|
73
|
+
name: "Create Chat Completion",
|
|
74
|
+
description: "Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.",
|
|
75
|
+
input: OpenrouterCreateChatCompletionInput,
|
|
76
|
+
output: OpenrouterCreateChatCompletionOutput
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
exports.openrouterCreateChatCompletion = openrouterCreateChatCompletion;
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=create-chat-completion.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-chat-completion.cjs","names":["z","action"],"sources":["../../src/actions/create-chat-completion.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateChatCompletionInput: z.ZodTypeAny = z.object({\n n: z.number().int().describe(\"Number of completion choices to generate.\").optional(),\n stop: z.union([z.string(), z.array(z.string())]).optional(),\n user: z.string().describe(\"A unique identifier for the end-user to help detect abuse.\").optional(),\n model: z.string().describe(\"ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures.\"),\n top_p: z.number().describe(\"Nucleus sampling probability, between 0 and 1.\").optional(),\n stream: z.boolean().default(false).describe(\"Whether to stream back partial message deltas.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"system\", \"user\", \"assistant\", \"tool\"]).describe(\"Role of the message sender.\"),\n content: z.string().describe(\"Content of the message.\"),\n})).describe(\"List of conversation messages to provide as context.\"),\n functions: z.array(z.object({\n name: z.string().describe(\"Name of the function to be called by the model.\"),\n parameters: z.record(z.string(), z.unknown()).describe(\"JSON schema describing function parameters.\"),\n description: z.string().describe(\"Description of the function purpose.\").optional(),\n})).describe(\"List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.\").optional(),\n logit_bias: z.object({}).describe(\"Adjust the likelihood of specified tokens.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate.\").optional(),\n temperature: z.number().describe(\"Sampling temperature to use, between 0 and 2.\").optional(),\n function_call: z.union([z.enum([\"none\", \"auto\"]), z.object({})]).optional(),\n presence_penalty: z.number().describe(\"Penalty for new tokens based on presence in the text so far.\").optional(),\n frequency_penalty: z.number().describe(\"Penalty for new tokens based on frequency in the text so far.\").optional(),\n});\nconst OpenrouterCreateChatCompletion_UsageSchema: z.ZodTypeAny = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens used.\"),\n prompt_tokens: z.number().int().describe(\"Number of tokens in the prompt.\"),\n completion_tokens: z.number().int().describe(\"Number of tokens generated in the completion.\"),\n});\nconst OpenrouterCreateChatCompletion_ErrorResponseSchema: z.ZodTypeAny = z.object({\n code: z.number().int().describe(\"Error code from the provider.\"),\n message: z.string().describe(\"Error message from the provider.\"),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional error information.\").nullable().optional(),\n});\nconst OpenrouterCreateChatCompletion_FunctionCallSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the function called by the model.\"),\n arguments: z.record(z.string(), z.unknown()).describe(\"Arguments provided to the function call.\"),\n});\nconst OpenrouterCreateChatCompletion_ToolCallSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for this tool call.\"),\n type: z.string().describe(\"Type of the call (function).\"),\n \"function\": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable(),\n});\nconst OpenrouterCreateChatCompletion_ChoiceMessageSchema: z.ZodTypeAny = z.object({\n role: z.string().describe(\"Role of the generated message content.\"),\n content: z.string().describe(\"Content of the generated message.\").nullable().optional(),\n tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe(\"Tool calls triggered by the model.\").nullable().optional(),\n});\nconst OpenrouterCreateChatCompletion_CreateChoiceSchema: z.ZodTypeAny = z.object({\n error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),\n message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),\n finish_reason: z.string().describe(\"The reason why the completion finished.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Provider-specific finish reason.\").nullable().optional(),\n});\nexport const OpenrouterCreateChatCompletionOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the completion.\"),\n model: z.string().describe(\"Model ID used for the completion.\"),\n usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),\n object: z.enum([\"chat.completion\", \"chat.completion.chunk\"]).describe(\"Object type returned.\"),\n choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe(\"List of generated completion choices.\"),\n created: z.number().int().describe(\"Unix timestamp when the completion was created.\"),\n system_fingerprint: z.string().describe(\"Provider fingerprint if supported.\").nullable().optional(),\n});\n\nexport const openrouterCreateChatCompletion = action(\"OPENROUTER_CREATE_CHAT_COMPLETION\", {\n slug: \"openrouter-create-chat-completion\",\n name: \"Create Chat Completion\",\n description: \"Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.\",\n input: OpenrouterCreateChatCompletionInput,\n output: OpenrouterCreateChatCompletionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAoDA,IAAAA,EAAE,OAAO;CACxE,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACnF,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACjG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2KAA2K;CACtM,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACtF,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACvG,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3B,MAAMA,IAAAA,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAa;EAAM,CAAC,CAAC,CAAC,SAAS,6BAA6B;EAC5F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACxD,CAAC,CAAC,CAAC,CAAC,SAAS,sDAAsD;CACjE,WAAWA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC5B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SA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C,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC;AACD,MAAa,uCAAqDA,IAAAA,EAAE,OAAO;CACzE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;CAC/D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAC9D,OAAO,2CAA2C,SAAS,CAAC,CAAC,SAAS;CACtE,QAAQA,IAAAA,EAAE,KAAK,CAAC,mBAAmB,uBAAuB,CAAC,CAAC,CAAC,SAAS,uBAAuB;CAC7F,SAASA,IAAAA,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,uCAAuC;CACpH,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD;CACpF,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC;AAED,MAAa,iCAAiCC,eAAAA,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-chat-completion.d.ts
|
|
4
|
+
declare const OpenrouterCreateChatCompletionInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterCreateChatCompletionOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterCreateChatCompletion: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterCreateChatCompletion };
|
|
9
|
+
//# sourceMappingURL=create-chat-completion.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-chat-completion.d.cts","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"mappings":";;;cAIa,mCAAA,EAAqC,CAAA,CAAE,UAsBlD;AAAA,cA+BW,oCAAA,EAAsC,CAAA,CAAE,UAQnD;AAAA,cAEW,8BAAA,gCAA8B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-chat-completion.d.ts
|
|
4
|
+
declare const OpenrouterCreateChatCompletionInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterCreateChatCompletionOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterCreateChatCompletion: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterCreateChatCompletion };
|
|
9
|
+
//# sourceMappingURL=create-chat-completion.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-chat-completion.d.mts","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"mappings":";;;cAIa,mCAAA,EAAqC,CAAA,CAAE,UAsBlD;AAAA,cA+BW,oCAAA,EAAsC,CAAA,CAAE,UAQnD;AAAA,cAEW,8BAAA,gCAA8B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-chat-completion.ts
|
|
4
|
+
const OpenrouterCreateChatCompletionInput = z.object({
|
|
5
|
+
n: z.number().int().describe("Number of completion choices to generate.").optional(),
|
|
6
|
+
stop: z.union([z.string(), z.array(z.string())]).optional(),
|
|
7
|
+
user: z.string().describe("A unique identifier for the end-user to help detect abuse.").optional(),
|
|
8
|
+
model: z.string().describe("ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures."),
|
|
9
|
+
top_p: z.number().describe("Nucleus sampling probability, between 0 and 1.").optional(),
|
|
10
|
+
stream: z.boolean().default(false).describe("Whether to stream back partial message deltas.").optional(),
|
|
11
|
+
messages: z.array(z.object({
|
|
12
|
+
role: z.enum([
|
|
13
|
+
"system",
|
|
14
|
+
"user",
|
|
15
|
+
"assistant",
|
|
16
|
+
"tool"
|
|
17
|
+
]).describe("Role of the message sender."),
|
|
18
|
+
content: z.string().describe("Content of the message.")
|
|
19
|
+
})).describe("List of conversation messages to provide as context."),
|
|
20
|
+
functions: z.array(z.object({
|
|
21
|
+
name: z.string().describe("Name of the function to be called by the model."),
|
|
22
|
+
parameters: z.record(z.string(), z.unknown()).describe("JSON schema describing function parameters."),
|
|
23
|
+
description: z.string().describe("Description of the function purpose.").optional()
|
|
24
|
+
})).describe("List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.").optional(),
|
|
25
|
+
logit_bias: z.object({}).describe("Adjust the likelihood of specified tokens.").optional(),
|
|
26
|
+
max_tokens: z.number().int().describe("Maximum number of tokens to generate.").optional(),
|
|
27
|
+
temperature: z.number().describe("Sampling temperature to use, between 0 and 2.").optional(),
|
|
28
|
+
function_call: z.union([z.enum(["none", "auto"]), z.object({})]).optional(),
|
|
29
|
+
presence_penalty: z.number().describe("Penalty for new tokens based on presence in the text so far.").optional(),
|
|
30
|
+
frequency_penalty: z.number().describe("Penalty for new tokens based on frequency in the text so far.").optional()
|
|
31
|
+
});
|
|
32
|
+
const OpenrouterCreateChatCompletion_UsageSchema = z.object({
|
|
33
|
+
total_tokens: z.number().int().describe("Total number of tokens used."),
|
|
34
|
+
prompt_tokens: z.number().int().describe("Number of tokens in the prompt."),
|
|
35
|
+
completion_tokens: z.number().int().describe("Number of tokens generated in the completion.")
|
|
36
|
+
});
|
|
37
|
+
const OpenrouterCreateChatCompletion_ErrorResponseSchema = z.object({
|
|
38
|
+
code: z.number().int().describe("Error code from the provider."),
|
|
39
|
+
message: z.string().describe("Error message from the provider."),
|
|
40
|
+
metadata: z.record(z.string(), z.unknown()).describe("Additional error information.").nullable().optional()
|
|
41
|
+
});
|
|
42
|
+
const OpenrouterCreateChatCompletion_FunctionCallSchema = z.object({
|
|
43
|
+
name: z.string().describe("Name of the function called by the model."),
|
|
44
|
+
arguments: z.record(z.string(), z.unknown()).describe("Arguments provided to the function call.")
|
|
45
|
+
});
|
|
46
|
+
const OpenrouterCreateChatCompletion_ToolCallSchema = z.object({
|
|
47
|
+
id: z.string().describe("Unique identifier for this tool call."),
|
|
48
|
+
type: z.string().describe("Type of the call (function)."),
|
|
49
|
+
"function": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable()
|
|
50
|
+
});
|
|
51
|
+
const OpenrouterCreateChatCompletion_ChoiceMessageSchema = z.object({
|
|
52
|
+
role: z.string().describe("Role of the generated message content."),
|
|
53
|
+
content: z.string().describe("Content of the generated message.").nullable().optional(),
|
|
54
|
+
tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe("Tool calls triggered by the model.").nullable().optional()
|
|
55
|
+
});
|
|
56
|
+
const OpenrouterCreateChatCompletion_CreateChoiceSchema = z.object({
|
|
57
|
+
error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),
|
|
58
|
+
message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),
|
|
59
|
+
finish_reason: z.string().describe("The reason why the completion finished.").nullable().optional(),
|
|
60
|
+
native_finish_reason: z.string().describe("Provider-specific finish reason.").nullable().optional()
|
|
61
|
+
});
|
|
62
|
+
const openrouterCreateChatCompletion = action("OPENROUTER_CREATE_CHAT_COMPLETION", {
|
|
63
|
+
slug: "openrouter-create-chat-completion",
|
|
64
|
+
name: "Create Chat Completion",
|
|
65
|
+
description: "Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.",
|
|
66
|
+
input: OpenrouterCreateChatCompletionInput,
|
|
67
|
+
output: z.object({
|
|
68
|
+
id: z.string().describe("Unique identifier for the completion."),
|
|
69
|
+
model: z.string().describe("Model ID used for the completion."),
|
|
70
|
+
usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),
|
|
71
|
+
object: z.enum(["chat.completion", "chat.completion.chunk"]).describe("Object type returned."),
|
|
72
|
+
choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe("List of generated completion choices."),
|
|
73
|
+
created: z.number().int().describe("Unix timestamp when the completion was created."),
|
|
74
|
+
system_fingerprint: z.string().describe("Provider fingerprint if supported.").nullable().optional()
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { openrouterCreateChatCompletion };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=create-chat-completion.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-chat-completion.mjs","names":[],"sources":["../../src/actions/create-chat-completion.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateChatCompletionInput: z.ZodTypeAny = z.object({\n n: z.number().int().describe(\"Number of completion choices to generate.\").optional(),\n stop: z.union([z.string(), z.array(z.string())]).optional(),\n user: z.string().describe(\"A unique identifier for the end-user to help detect abuse.\").optional(),\n model: z.string().describe(\"ID of the model to use for the chat completion. Must exactly match an ID returned by OPENROUTER_LIST_AVAILABLE_MODELS; typos or approximate names cause request failures.\"),\n top_p: z.number().describe(\"Nucleus sampling probability, between 0 and 1.\").optional(),\n stream: z.boolean().default(false).describe(\"Whether to stream back partial message deltas.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"system\", \"user\", \"assistant\", \"tool\"]).describe(\"Role of the message sender.\"),\n content: z.string().describe(\"Content of the message.\"),\n})).describe(\"List of conversation messages to provide as context.\"),\n functions: z.array(z.object({\n name: z.string().describe(\"Name of the function to be called by the model.\"),\n parameters: z.record(z.string(), z.unknown()).describe(\"JSON schema describing function parameters.\"),\n description: z.string().describe(\"Description of the function purpose.\").optional(),\n})).describe(\"List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER_LIST_AVAILABLE_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.\").optional(),\n logit_bias: z.object({}).describe(\"Adjust the likelihood of specified tokens.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate.\").optional(),\n temperature: z.number().describe(\"Sampling temperature to use, between 0 and 2.\").optional(),\n function_call: z.union([z.enum([\"none\", \"auto\"]), z.object({})]).optional(),\n presence_penalty: z.number().describe(\"Penalty for new tokens based on presence in the text so far.\").optional(),\n frequency_penalty: z.number().describe(\"Penalty for new tokens based on frequency in the text so far.\").optional(),\n});\nconst OpenrouterCreateChatCompletion_UsageSchema: z.ZodTypeAny = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens used.\"),\n prompt_tokens: z.number().int().describe(\"Number of tokens in the prompt.\"),\n completion_tokens: z.number().int().describe(\"Number of tokens generated in the completion.\"),\n});\nconst OpenrouterCreateChatCompletion_ErrorResponseSchema: z.ZodTypeAny = z.object({\n code: z.number().int().describe(\"Error code from the provider.\"),\n message: z.string().describe(\"Error message from the provider.\"),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional error information.\").nullable().optional(),\n});\nconst OpenrouterCreateChatCompletion_FunctionCallSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the function called by the model.\"),\n arguments: z.record(z.string(), z.unknown()).describe(\"Arguments provided to the function call.\"),\n});\nconst OpenrouterCreateChatCompletion_ToolCallSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for this tool call.\"),\n type: z.string().describe(\"Type of the call (function).\"),\n \"function\": OpenrouterCreateChatCompletion_FunctionCallSchema.nullable(),\n});\nconst OpenrouterCreateChatCompletion_ChoiceMessageSchema: z.ZodTypeAny = z.object({\n role: z.string().describe(\"Role of the generated message content.\"),\n content: z.string().describe(\"Content of the generated message.\").nullable().optional(),\n tool_calls: z.array(OpenrouterCreateChatCompletion_ToolCallSchema).describe(\"Tool calls triggered by the model.\").nullable().optional(),\n});\nconst OpenrouterCreateChatCompletion_CreateChoiceSchema: z.ZodTypeAny = z.object({\n error: OpenrouterCreateChatCompletion_ErrorResponseSchema.nullable().optional(),\n message: OpenrouterCreateChatCompletion_ChoiceMessageSchema.nullable(),\n finish_reason: z.string().describe(\"The reason why the completion finished.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Provider-specific finish reason.\").nullable().optional(),\n});\nexport const OpenrouterCreateChatCompletionOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the completion.\"),\n model: z.string().describe(\"Model ID used for the completion.\"),\n usage: OpenrouterCreateChatCompletion_UsageSchema.nullable().optional(),\n object: z.enum([\"chat.completion\", \"chat.completion.chunk\"]).describe(\"Object type returned.\"),\n choices: z.array(OpenrouterCreateChatCompletion_CreateChoiceSchema).describe(\"List of generated completion choices.\"),\n created: z.number().int().describe(\"Unix timestamp when the completion was created.\"),\n system_fingerprint: z.string().describe(\"Provider fingerprint if supported.\").nullable().optional(),\n});\n\nexport const openrouterCreateChatCompletion = action(\"OPENROUTER_CREATE_CHAT_COMPLETION\", {\n slug: \"openrouter-create-chat-completion\",\n name: \"Create Chat Completion\",\n description: \"Tool to generate a chat-style completion. Use after assembling messages and selecting a model. Supports streaming and function calls. Response format varies across models; use explicit prompt instructions to standardize output. Provider-level rate limits and moderation policies differ per model.\",\n input: OpenrouterCreateChatCompletionInput,\n output: OpenrouterCreateChatCompletionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAoD,EAAE,OAAO;CACxE,GAAG,EAAE,OAAO,CAAC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AAC,SAAS,wCAAwC;CAClE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtF,YAAY,EAAE,MAAM,6CAA6C,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxI,CAAC;AACD,MAAM,oDAAkE,EAAE,OAAO;CAC/E,OAAO,mDAAmD,SAAS,CAAC,CAAC,SAAS;CAC9E,SAAS,mDAAmD,SAAS;CACrE,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClG,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC;AAWD,MAAa,iCAAiC,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAfgE,EAAE,OAAO;EACzE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;EAC/D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;EAC9D,OAAO,2CAA2C,SAAS,CAAC,CAAC,SAAS;EACtE,QAAQ,EAAE,KAAK,CAAC,mBAAmB,uBAAuB,CAAC,CAAC,CAAC,SAAS,uBAAuB;EAC7F,SAAS,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,uCAAuC;EACpH,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD;EACpF,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-coinbase-charge.ts
|
|
4
|
+
const OpenrouterCreateCoinbaseChargeInput = zod.z.object({
|
|
5
|
+
amount: zod.z.number().describe("Amount in USD to charge. This will be converted to the equivalent crypto amount."),
|
|
6
|
+
sender: zod.z.string().describe("Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x')."),
|
|
7
|
+
X_Title: zod.z.string().describe("The app display name that customizes how your app appears in OpenRouter's dashboard.").optional(),
|
|
8
|
+
chain_id: zod.z.union([
|
|
9
|
+
zod.z.literal(1),
|
|
10
|
+
zod.z.literal(137),
|
|
11
|
+
zod.z.literal(8453)
|
|
12
|
+
]).describe("Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base)."),
|
|
13
|
+
HTTP_Referer: zod.z.string().describe("The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.").optional()
|
|
14
|
+
});
|
|
15
|
+
const OpenrouterCreateCoinbaseCharge_Web3DataSchema = zod.z.object({ transfer_intent: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Details of the transfer intent for the crypto payment") });
|
|
16
|
+
const OpenrouterCreateCoinbaseCharge_ChargeDataSchema = zod.z.object({
|
|
17
|
+
id: zod.z.string().describe("Unique identifier for the created charge"),
|
|
18
|
+
web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),
|
|
19
|
+
created_at: zod.z.string().describe("ISO 8601 timestamp when the charge was created"),
|
|
20
|
+
expires_at: zod.z.string().describe("ISO 8601 timestamp when the charge expires")
|
|
21
|
+
});
|
|
22
|
+
const OpenrouterCreateCoinbaseChargeOutput = zod.z.object({ data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable() });
|
|
23
|
+
const openrouterCreateCoinbaseCharge = require_action.action("OPENROUTER_CREATE_COINBASE_CHARGE", {
|
|
24
|
+
slug: "openrouter-create-coinbase-charge",
|
|
25
|
+
name: "Create Coinbase Charge",
|
|
26
|
+
description: "Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.",
|
|
27
|
+
input: OpenrouterCreateCoinbaseChargeInput,
|
|
28
|
+
output: OpenrouterCreateCoinbaseChargeOutput
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.openrouterCreateCoinbaseCharge = openrouterCreateCoinbaseCharge;
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=create-coinbase-charge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-coinbase-charge.cjs","names":["z","action"],"sources":["../../src/actions/create-coinbase-charge.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateCoinbaseChargeInput: z.ZodTypeAny = z.object({\n amount: z.number().describe(\"Amount in USD to charge. This will be converted to the equivalent crypto amount.\"),\n sender: z.string().describe(\"Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').\"),\n X_Title: z.string().describe(\"The app display name that customizes how your app appears in OpenRouter's dashboard.\").optional(),\n chain_id: z.union([z.literal(1), z.literal(137), z.literal(8453)]).describe(\"Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).\"),\n HTTP_Referer: z.string().describe(\"The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.\").optional(),\n});\nconst OpenrouterCreateCoinbaseCharge_Web3DataSchema: z.ZodTypeAny = z.object({\n transfer_intent: z.record(z.string(), z.unknown()).describe(\"Details of the transfer intent for the crypto payment\"),\n});\nconst OpenrouterCreateCoinbaseCharge_ChargeDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the created charge\"),\n web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the charge was created\"),\n expires_at: z.string().describe(\"ISO 8601 timestamp when the charge expires\"),\n});\nexport const OpenrouterCreateCoinbaseChargeOutput: z.ZodTypeAny = z.object({\n data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable(),\n});\n\nexport const openrouterCreateCoinbaseCharge = action(\"OPENROUTER_CREATE_COINBASE_CHARGE\", {\n slug: \"openrouter-create-coinbase-charge\",\n name: \"Create Coinbase Charge\",\n description: \"Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.\",\n input: OpenrouterCreateCoinbaseChargeInput,\n output: OpenrouterCreateCoinbaseChargeOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAoDA,IAAAA,EAAE,OAAO;CACxE,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF;CAC9G,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG;CAClI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC9H,UAAUA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,GAAG;EAAGA,IAAAA,EAAE,QAAQ,IAAI;CAAC,CAAC,CAAC,CAAC,SAAS,oGAAoG;CAChL,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yHAAyH,CAAC,CAAC,SAAS;AACxK,CAAC;AACD,MAAM,gDAA8DA,IAAAA,EAAE,OAAO,EAC3E,iBAAiBA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uDAAuD,EACrH,CAAC;AACD,MAAM,kDAAgEA,IAAAA,EAAE,OAAO;CAC7E,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,WAAW,8CAA8C,SAAS;CAClE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;CAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;AAC9E,CAAC;AACD,MAAa,uCAAqDA,IAAAA,EAAE,OAAO,EACzE,MAAM,gDAAgD,SAAS,EACjE,CAAC;AAED,MAAa,iCAAiCC,eAAAA,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-coinbase-charge.d.ts
|
|
4
|
+
declare const OpenrouterCreateCoinbaseChargeInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterCreateCoinbaseChargeOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterCreateCoinbaseCharge: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterCreateCoinbaseCharge };
|
|
9
|
+
//# sourceMappingURL=create-coinbase-charge.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-coinbase-charge.d.cts","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"mappings":";;;cAIa,mCAAA,EAAqC,CAAA,CAAE,UAMlD;AAAA,cAUW,oCAAA,EAAsC,CAAA,CAAE,UAEnD;AAAA,cAEW,8BAAA,gCAA8B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-coinbase-charge.d.ts
|
|
4
|
+
declare const OpenrouterCreateCoinbaseChargeInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterCreateCoinbaseChargeOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterCreateCoinbaseCharge: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterCreateCoinbaseCharge };
|
|
9
|
+
//# sourceMappingURL=create-coinbase-charge.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-coinbase-charge.d.mts","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"mappings":";;;cAIa,mCAAA,EAAqC,CAAA,CAAE,UAMlD;AAAA,cAUW,oCAAA,EAAsC,CAAA,CAAE,UAEnD;AAAA,cAEW,8BAAA,gCAA8B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-coinbase-charge.ts
|
|
4
|
+
const OpenrouterCreateCoinbaseChargeInput = z.object({
|
|
5
|
+
amount: z.number().describe("Amount in USD to charge. This will be converted to the equivalent crypto amount."),
|
|
6
|
+
sender: z.string().describe("Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x')."),
|
|
7
|
+
X_Title: z.string().describe("The app display name that customizes how your app appears in OpenRouter's dashboard.").optional(),
|
|
8
|
+
chain_id: z.union([
|
|
9
|
+
z.literal(1),
|
|
10
|
+
z.literal(137),
|
|
11
|
+
z.literal(8453)
|
|
12
|
+
]).describe("Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base)."),
|
|
13
|
+
HTTP_Referer: z.string().describe("The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.").optional()
|
|
14
|
+
});
|
|
15
|
+
const OpenrouterCreateCoinbaseCharge_Web3DataSchema = z.object({ transfer_intent: z.record(z.string(), z.unknown()).describe("Details of the transfer intent for the crypto payment") });
|
|
16
|
+
const OpenrouterCreateCoinbaseCharge_ChargeDataSchema = z.object({
|
|
17
|
+
id: z.string().describe("Unique identifier for the created charge"),
|
|
18
|
+
web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),
|
|
19
|
+
created_at: z.string().describe("ISO 8601 timestamp when the charge was created"),
|
|
20
|
+
expires_at: z.string().describe("ISO 8601 timestamp when the charge expires")
|
|
21
|
+
});
|
|
22
|
+
const openrouterCreateCoinbaseCharge = action("OPENROUTER_CREATE_COINBASE_CHARGE", {
|
|
23
|
+
slug: "openrouter-create-coinbase-charge",
|
|
24
|
+
name: "Create Coinbase Charge",
|
|
25
|
+
description: "Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.",
|
|
26
|
+
input: OpenrouterCreateCoinbaseChargeInput,
|
|
27
|
+
output: z.object({ data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable() })
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { openrouterCreateCoinbaseCharge };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=create-coinbase-charge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-coinbase-charge.mjs","names":[],"sources":["../../src/actions/create-coinbase-charge.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateCoinbaseChargeInput: z.ZodTypeAny = z.object({\n amount: z.number().describe(\"Amount in USD to charge. This will be converted to the equivalent crypto amount.\"),\n sender: z.string().describe(\"Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').\"),\n X_Title: z.string().describe(\"The app display name that customizes how your app appears in OpenRouter's dashboard.\").optional(),\n chain_id: z.union([z.literal(1), z.literal(137), z.literal(8453)]).describe(\"Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).\"),\n HTTP_Referer: z.string().describe(\"The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.\").optional(),\n});\nconst OpenrouterCreateCoinbaseCharge_Web3DataSchema: z.ZodTypeAny = z.object({\n transfer_intent: z.record(z.string(), z.unknown()).describe(\"Details of the transfer intent for the crypto payment\"),\n});\nconst OpenrouterCreateCoinbaseCharge_ChargeDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the created charge\"),\n web3_data: OpenrouterCreateCoinbaseCharge_Web3DataSchema.nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the charge was created\"),\n expires_at: z.string().describe(\"ISO 8601 timestamp when the charge expires\"),\n});\nexport const OpenrouterCreateCoinbaseChargeOutput: z.ZodTypeAny = z.object({\n data: OpenrouterCreateCoinbaseCharge_ChargeDataSchema.nullable(),\n});\n\nexport const openrouterCreateCoinbaseCharge = action(\"OPENROUTER_CREATE_COINBASE_CHARGE\", {\n slug: \"openrouter-create-coinbase-charge\",\n name: \"Create Coinbase Charge\",\n description: \"Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.\",\n input: OpenrouterCreateCoinbaseChargeInput,\n output: OpenrouterCreateCoinbaseChargeOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sCAAoD,EAAE,OAAO;CACxE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF;CAC9G,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,sGAAsG;CAClI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC9H,UAAU,EAAE,MAAM;EAAC,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,GAAG;EAAG,EAAE,QAAQ,IAAI;CAAC,CAAC,CAAC,CAAC,SAAS,oGAAoG;CAChL,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,yHAAyH,CAAC,CAAC,SAAS;AACxK,CAAC;AACD,MAAM,gDAA8D,EAAE,OAAO,EAC3E,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uDAAuD,EACrH,CAAC;AACD,MAAM,kDAAgE,EAAE,OAAO;CAC7E,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,WAAW,8CAA8C,SAAS;CAClE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;CAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;AAC9E,CAAC;AAKD,MAAa,iCAAiC,OAAO,qCAAqC;CACxF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATgE,EAAE,OAAO,EACzE,MAAM,gDAAgD,SAAS,EACjE,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-message.ts
|
|
4
|
+
const OpenrouterCreateMessageInput = zod.z.object({
|
|
5
|
+
user: zod.z.string().describe("Unique identifier for the end-user (max 128 characters).").optional(),
|
|
6
|
+
model: zod.z.string().describe("Model identifier to use for generation. Example: 'anthropic/claude-4.5-sonnet-20250929'."),
|
|
7
|
+
tools: zod.z.array(zod.z.object({
|
|
8
|
+
name: zod.z.string().describe("Name of the tool."),
|
|
9
|
+
type: zod.z.string().describe("Type of tool (default: 'function').").optional(),
|
|
10
|
+
description: zod.z.string().describe("Description of the tool.").optional(),
|
|
11
|
+
input_schema: zod.z.record(zod.z.string(), zod.z.unknown()).describe("JSON schema describing the tool's input parameters.").optional()
|
|
12
|
+
}).describe("Tool definition for function calling.")).describe("List of tools available for the model to call.").optional(),
|
|
13
|
+
top_k: zod.z.number().int().describe("Top-k sampling parameter.").optional(),
|
|
14
|
+
top_p: zod.z.number().describe("Nucleus sampling probability between 0 and 1.").optional(),
|
|
15
|
+
models: zod.z.array(zod.z.string()).describe("List of fallback models to use if primary model fails.").optional(),
|
|
16
|
+
stream: zod.z.boolean().describe("Whether to stream the response. Default false.").optional(),
|
|
17
|
+
system: zod.z.union([zod.z.string(), zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown()))]).optional(),
|
|
18
|
+
plugins: zod.z.array(zod.z.object({
|
|
19
|
+
id: zod.z.string().describe("Plugin identifier."),
|
|
20
|
+
enabled: zod.z.boolean().describe("Whether the plugin is enabled.").optional()
|
|
21
|
+
}).describe("Plugin configuration.")).describe("Plugins to enable for this request.").optional(),
|
|
22
|
+
x_title: zod.z.string().describe("App display name for OpenRouter dashboard.").optional(),
|
|
23
|
+
messages: zod.z.array(zod.z.object({
|
|
24
|
+
role: zod.z.enum(["user", "assistant"]).describe("Role of the message sender."),
|
|
25
|
+
content: zod.z.union([zod.z.string(), zod.z.array(zod.z.object({
|
|
26
|
+
text: zod.z.string().nullable().optional(),
|
|
27
|
+
type: zod.z.string().describe("Type of content block (e.g., 'text', 'image')."),
|
|
28
|
+
source: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional()
|
|
29
|
+
}).describe("Content block in a message."))])
|
|
30
|
+
}).describe("Message in the conversation.")).describe("List of conversation messages. Each message has a role ('user' or 'assistant') and content."),
|
|
31
|
+
metadata: zod.z.object({ user_id: zod.z.string().describe("Unique identifier for the user making the request.").optional() }).describe("Metadata for the request.").optional(),
|
|
32
|
+
provider: zod.z.object({
|
|
33
|
+
zdr: zod.z.boolean().describe("Whether to restrict routing to only ZDR (Zero Data Retention) endpoints.").optional(),
|
|
34
|
+
allow_fallbacks: zod.z.boolean().describe("Whether to allow backup providers when primary is unavailable. Default true.").optional(),
|
|
35
|
+
data_collection: zod.z.enum(["allow", "deny"]).describe("Data collection preference for provider routing.").optional(),
|
|
36
|
+
require_parameters: zod.z.boolean().describe("Whether to filter providers to only those that support all provided parameters.").optional(),
|
|
37
|
+
enforce_distillable_text: zod.z.boolean().describe("Whether to restrict routing to only models that allow text distillation.").optional()
|
|
38
|
+
}).describe("Provider routing preferences.").optional(),
|
|
39
|
+
thinking: zod.z.object({
|
|
40
|
+
type: zod.z.string().describe("Type of thinking configuration."),
|
|
41
|
+
budget_tokens: zod.z.number().int().describe("Budget for thinking tokens.").optional()
|
|
42
|
+
}).describe("Configuration for extended thinking.").optional(),
|
|
43
|
+
max_tokens: zod.z.number().int().describe("Maximum number of tokens to generate in the response."),
|
|
44
|
+
session_id: zod.z.string().describe("Unique identifier for grouping related requests (max 128 characters).").optional(),
|
|
45
|
+
temperature: zod.z.number().describe("Sampling temperature between 0 and 2.").optional(),
|
|
46
|
+
tool_choice: zod.z.object({
|
|
47
|
+
name: zod.z.string().describe("Name of specific tool to use (when type is 'tool').").optional(),
|
|
48
|
+
type: zod.z.string().describe("Type of tool choice: 'auto', 'any', 'tool', etc."),
|
|
49
|
+
disable_parallel_tool_use: zod.z.boolean().describe("Whether to disable parallel tool use.").optional()
|
|
50
|
+
}).describe("Tool choice configuration.").optional(),
|
|
51
|
+
http_referer: zod.z.string().describe("App URL identifier used for tracking API usage per application.").optional(),
|
|
52
|
+
service_tier: zod.z.enum(["auto", "standard_only"]).describe("Service tier for the request.").optional(),
|
|
53
|
+
output_config: zod.z.object({ effort: zod.z.enum([
|
|
54
|
+
"low",
|
|
55
|
+
"medium",
|
|
56
|
+
"high",
|
|
57
|
+
"max"
|
|
58
|
+
]).describe("Effort level for output generation.").optional() }).describe("Configuration for controlling output behavior.").optional(),
|
|
59
|
+
stop_sequences: zod.z.array(zod.z.string()).describe("Sequences where generation should stop.").optional()
|
|
60
|
+
}).describe("Request to create a message using Anthropic Messages API format.");
|
|
61
|
+
const OpenrouterCreateMessage_ResponseUsageSchema = zod.z.object({
|
|
62
|
+
input_tokens: zod.z.number().int().describe("Number of input tokens."),
|
|
63
|
+
output_tokens: zod.z.number().int().describe("Number of output tokens."),
|
|
64
|
+
cache_read_input_tokens: zod.z.number().int().describe("Number of tokens read from cache.").nullable().optional(),
|
|
65
|
+
cache_creation_input_tokens: zod.z.number().int().describe("Number of tokens used for cache creation.").nullable().optional()
|
|
66
|
+
}).describe("Token usage information.");
|
|
67
|
+
const OpenrouterCreateMessage_ContentBlockSchema = zod.z.object({
|
|
68
|
+
text: zod.z.string().describe("Text content if applicable.").nullable().optional(),
|
|
69
|
+
type: zod.z.string().describe("Type of content block.")
|
|
70
|
+
}).describe("Content block in the response.");
|
|
71
|
+
const OpenrouterCreateMessageOutput = zod.z.object({
|
|
72
|
+
id: zod.z.string().describe("Unique identifier for this message."),
|
|
73
|
+
role: zod.z.string().describe("Role of the response, typically 'assistant'."),
|
|
74
|
+
type: zod.z.string().describe("Object type, typically 'message'."),
|
|
75
|
+
model: zod.z.string().describe("Model that generated the response."),
|
|
76
|
+
usage: OpenrouterCreateMessage_ResponseUsageSchema.nullable(),
|
|
77
|
+
content: zod.z.array(OpenrouterCreateMessage_ContentBlockSchema).describe("List of content blocks in the response."),
|
|
78
|
+
stop_reason: zod.z.string().describe("Reason why generation stopped.").nullable().optional(),
|
|
79
|
+
stop_sequence: zod.z.string().describe("Stop sequence that triggered generation to stop.").nullable().optional()
|
|
80
|
+
}).describe("Response from creating a message.");
|
|
81
|
+
const openrouterCreateMessage = require_action.action("OPENROUTER_CREATE_MESSAGE", {
|
|
82
|
+
slug: "openrouter-create-message",
|
|
83
|
+
name: "Create Message (Anthropic Format)",
|
|
84
|
+
description: "Tool to create a message using Anthropic Messages API format via OpenRouter. Use when you need Claude-compatible chat completion with support for text, images, PDFs, tools, and extended thinking.",
|
|
85
|
+
input: OpenrouterCreateMessageInput,
|
|
86
|
+
output: OpenrouterCreateMessageOutput
|
|
87
|
+
});
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.openrouterCreateMessage = openrouterCreateMessage;
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=create-message.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-message.cjs","names":["z","action"],"sources":["../../src/actions/create-message.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterCreateMessageInput: z.ZodTypeAny = z.object({\n user: z.string().describe(\"Unique identifier for the end-user (max 128 characters).\").optional(),\n model: z.string().describe(\"Model identifier to use for generation. Example: 'anthropic/claude-4.5-sonnet-20250929'.\"),\n tools: z.array(z.object({\n name: z.string().describe(\"Name of the tool.\"),\n type: z.string().describe(\"Type of tool (default: 'function').\").optional(),\n description: z.string().describe(\"Description of the tool.\").optional(),\n input_schema: z.record(z.string(), z.unknown()).describe(\"JSON schema describing the tool's input parameters.\").optional(),\n}).describe(\"Tool definition for function calling.\")).describe(\"List of tools available for the model to call.\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter.\").optional(),\n top_p: z.number().describe(\"Nucleus sampling probability between 0 and 1.\").optional(),\n models: z.array(z.string()).describe(\"List of fallback models to use if primary model fails.\").optional(),\n stream: z.boolean().describe(\"Whether to stream the response. Default false.\").optional(),\n system: z.union([z.string(), z.array(z.record(z.string(), z.unknown()))]).optional(),\n plugins: z.array(z.object({\n id: z.string().describe(\"Plugin identifier.\"),\n enabled: z.boolean().describe(\"Whether the plugin is enabled.\").optional(),\n}).describe(\"Plugin configuration.\")).describe(\"Plugins to enable for this request.\").optional(),\n x_title: z.string().describe(\"App display name for OpenRouter dashboard.\").optional(),\n messages: z.array(z.object({\n role: z.enum([\"user\", \"assistant\"]).describe(\"Role of the message sender.\"),\n content: z.union([z.string(), z.array(z.object({\n text: z.string().nullable().optional(),\n type: z.string().describe(\"Type of content block (e.g., 'text', 'image').\"),\n source: z.record(z.string(), z.unknown()).nullable().optional(),\n}).describe(\"Content block in a message.\"))]),\n}).describe(\"Message in the conversation.\")).describe(\"List of conversation messages. Each message has a role ('user' or 'assistant') and content.\"),\n metadata: z.object({\n user_id: z.string().describe(\"Unique identifier for the user making the request.\").optional(),\n}).describe(\"Metadata for the request.\").optional(),\n provider: z.object({\n zdr: z.boolean().describe(\"Whether to restrict routing to only ZDR (Zero Data Retention) endpoints.\").optional(),\n allow_fallbacks: z.boolean().describe(\"Whether to allow backup providers when primary is unavailable. Default true.\").optional(),\n data_collection: z.enum([\"allow\", \"deny\"]).describe(\"Data collection preference for provider routing.\").optional(),\n require_parameters: z.boolean().describe(\"Whether to filter providers to only those that support all provided parameters.\").optional(),\n enforce_distillable_text: z.boolean().describe(\"Whether to restrict routing to only models that allow text distillation.\").optional(),\n}).describe(\"Provider routing preferences.\").optional(),\n thinking: z.object({\n type: z.string().describe(\"Type of thinking configuration.\"),\n budget_tokens: z.number().int().describe(\"Budget for thinking tokens.\").optional(),\n}).describe(\"Configuration for extended thinking.\").optional(),\n max_tokens: z.number().int().describe(\"Maximum number of tokens to generate in the response.\"),\n session_id: z.string().describe(\"Unique identifier for grouping related requests (max 128 characters).\").optional(),\n temperature: z.number().describe(\"Sampling temperature between 0 and 2.\").optional(),\n tool_choice: z.object({\n name: z.string().describe(\"Name of specific tool to use (when type is 'tool').\").optional(),\n type: z.string().describe(\"Type of tool choice: 'auto', 'any', 'tool', etc.\"),\n disable_parallel_tool_use: z.boolean().describe(\"Whether to disable parallel tool use.\").optional(),\n}).describe(\"Tool choice configuration.\").optional(),\n http_referer: z.string().describe(\"App URL identifier used for tracking API usage per application.\").optional(),\n service_tier: z.enum([\"auto\", \"standard_only\"]).describe(\"Service tier for the request.\").optional(),\n output_config: z.object({\n effort: z.enum([\"low\", \"medium\", \"high\", \"max\"]).describe(\"Effort level for output generation.\").optional(),\n}).describe(\"Configuration for controlling output behavior.\").optional(),\n stop_sequences: z.array(z.string()).describe(\"Sequences where generation should stop.\").optional(),\n}).describe(\"Request to create a message using Anthropic Messages API format.\");\nconst OpenrouterCreateMessage_ResponseUsageSchema: z.ZodTypeAny = z.object({\n input_tokens: z.number().int().describe(\"Number of input tokens.\"),\n output_tokens: z.number().int().describe(\"Number of output tokens.\"),\n cache_read_input_tokens: z.number().int().describe(\"Number of tokens read from cache.\").nullable().optional(),\n cache_creation_input_tokens: z.number().int().describe(\"Number of tokens used for cache creation.\").nullable().optional(),\n}).describe(\"Token usage information.\");\nconst OpenrouterCreateMessage_ContentBlockSchema: z.ZodTypeAny = z.object({\n text: z.string().describe(\"Text content if applicable.\").nullable().optional(),\n type: z.string().describe(\"Type of content block.\"),\n}).describe(\"Content block in the response.\");\nexport const OpenrouterCreateMessageOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for this message.\"),\n role: z.string().describe(\"Role of the response, typically 'assistant'.\"),\n type: z.string().describe(\"Object type, typically 'message'.\"),\n model: z.string().describe(\"Model that generated the response.\"),\n usage: OpenrouterCreateMessage_ResponseUsageSchema.nullable(),\n content: z.array(OpenrouterCreateMessage_ContentBlockSchema).describe(\"List of content blocks in the response.\"),\n stop_reason: z.string().describe(\"Reason why generation stopped.\").nullable().optional(),\n stop_sequence: z.string().describe(\"Stop sequence that triggered generation to stop.\").nullable().optional(),\n}).describe(\"Response from creating a message.\");\n\nexport const openrouterCreateMessage = action(\"OPENROUTER_CREATE_MESSAGE\", {\n slug: \"openrouter-create-message\",\n name: \"Create Message (Anthropic Format)\",\n description: \"Tool to create a message using Anthropic Messages API format via OpenRouter. Use when you need Claude-compatible chat completion with support for text, images, PDFs, tools, and extended thinking.\",\n input: OpenrouterCreateMessageInput,\n output: OpenrouterCreateMessageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6CA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAC/F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F;CACrH,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB;EAC7C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAC1E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;EACtE,cAAcA,IA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EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,SAAS,mCAAmC;AAE/C,MAAa,0BAA0BC,eAAAA,OAAO,6BAA6B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-message.d.ts
|
|
4
|
+
declare const OpenrouterCreateMessageInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterCreateMessageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterCreateMessage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterCreateMessage };
|
|
9
|
+
//# sourceMappingURL=create-message.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-message.d.cts","names":[],"sources":["../../src/actions/create-message.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAuDkC;AAAA,cAWlE,6BAAA,EAA+B,CAAA,CAAE,UASE;AAAA,cAEnC,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-message.d.ts
|
|
4
|
+
declare const OpenrouterCreateMessageInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterCreateMessageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterCreateMessage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterCreateMessage };
|
|
9
|
+
//# sourceMappingURL=create-message.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-message.d.mts","names":[],"sources":["../../src/actions/create-message.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAuDkC;AAAA,cAWlE,6BAAA,EAA+B,CAAA,CAAE,UASE;AAAA,cAEnC,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|