@keystrokehq/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.
Files changed (113) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/create-chat-completion.cjs +13 -13
  4. package/dist/actions/create-chat-completion.cjs.map +1 -1
  5. package/dist/actions/create-chat-completion.d.cts +90 -3
  6. package/dist/actions/create-chat-completion.d.cts.map +1 -1
  7. package/dist/actions/create-chat-completion.d.mts +90 -3
  8. package/dist/actions/create-chat-completion.d.mts.map +1 -1
  9. package/dist/actions/create-chat-completion.mjs +13 -13
  10. package/dist/actions/create-chat-completion.mjs.map +1 -1
  11. package/dist/actions/create-coinbase-charge.cjs +3 -3
  12. package/dist/actions/create-coinbase-charge.cjs.map +1 -1
  13. package/dist/actions/create-coinbase-charge.d.cts +24 -3
  14. package/dist/actions/create-coinbase-charge.d.cts.map +1 -1
  15. package/dist/actions/create-coinbase-charge.d.mts +24 -3
  16. package/dist/actions/create-coinbase-charge.d.mts.map +1 -1
  17. package/dist/actions/create-coinbase-charge.mjs +3 -3
  18. package/dist/actions/create-coinbase-charge.mjs.map +1 -1
  19. package/dist/actions/create-message.cjs +7 -7
  20. package/dist/actions/create-message.cjs.map +1 -1
  21. package/dist/actions/create-message.d.cts +144 -3
  22. package/dist/actions/create-message.d.cts.map +1 -1
  23. package/dist/actions/create-message.d.mts +144 -3
  24. package/dist/actions/create-message.d.mts.map +1 -1
  25. package/dist/actions/create-message.mjs +7 -7
  26. package/dist/actions/create-message.mjs.map +1 -1
  27. package/dist/actions/get-credits.cjs +2 -2
  28. package/dist/actions/get-credits.cjs.map +1 -1
  29. package/dist/actions/get-credits.d.cts +8 -3
  30. package/dist/actions/get-credits.d.cts.map +1 -1
  31. package/dist/actions/get-credits.d.mts +8 -3
  32. package/dist/actions/get-credits.d.mts.map +1 -1
  33. package/dist/actions/get-credits.mjs +2 -2
  34. package/dist/actions/get-credits.mjs.map +1 -1
  35. package/dist/actions/get-current-key.cjs +16 -16
  36. package/dist/actions/get-current-key.cjs.map +1 -1
  37. package/dist/actions/get-current-key.d.cts +34 -3
  38. package/dist/actions/get-current-key.d.cts.map +1 -1
  39. package/dist/actions/get-current-key.d.mts +34 -3
  40. package/dist/actions/get-current-key.d.mts.map +1 -1
  41. package/dist/actions/get-current-key.mjs +16 -16
  42. package/dist/actions/get-current-key.mjs.map +1 -1
  43. package/dist/actions/get-generation.cjs +19 -19
  44. package/dist/actions/get-generation.cjs.map +1 -1
  45. package/dist/actions/get-generation.d.cts +37 -3
  46. package/dist/actions/get-generation.d.cts.map +1 -1
  47. package/dist/actions/get-generation.d.mts +37 -3
  48. package/dist/actions/get-generation.d.mts.map +1 -1
  49. package/dist/actions/get-generation.mjs +19 -19
  50. package/dist/actions/get-generation.mjs.map +1 -1
  51. package/dist/actions/get-models-count.cjs +1 -1
  52. package/dist/actions/get-models-count.cjs.map +1 -1
  53. package/dist/actions/get-models-count.d.cts +13 -3
  54. package/dist/actions/get-models-count.d.cts.map +1 -1
  55. package/dist/actions/get-models-count.d.mts +13 -3
  56. package/dist/actions/get-models-count.d.mts.map +1 -1
  57. package/dist/actions/get-models-count.mjs +1 -1
  58. package/dist/actions/get-models-count.mjs.map +1 -1
  59. package/dist/actions/list-available-models.cjs +12 -12
  60. package/dist/actions/list-available-models.cjs.map +1 -1
  61. package/dist/actions/list-available-models.d.cts +68 -3
  62. package/dist/actions/list-available-models.d.cts.map +1 -1
  63. package/dist/actions/list-available-models.d.mts +68 -3
  64. package/dist/actions/list-available-models.d.mts.map +1 -1
  65. package/dist/actions/list-available-models.mjs +12 -12
  66. package/dist/actions/list-available-models.mjs.map +1 -1
  67. package/dist/actions/list-embedding-models.cjs +10 -10
  68. package/dist/actions/list-embedding-models.cjs.map +1 -1
  69. package/dist/actions/list-embedding-models.d.cts +41 -3
  70. package/dist/actions/list-embedding-models.d.cts.map +1 -1
  71. package/dist/actions/list-embedding-models.d.mts +41 -3
  72. package/dist/actions/list-embedding-models.d.mts.map +1 -1
  73. package/dist/actions/list-embedding-models.mjs +10 -10
  74. package/dist/actions/list-embedding-models.mjs.map +1 -1
  75. package/dist/actions/list-model-endpoints.cjs +9 -9
  76. package/dist/actions/list-model-endpoints.cjs.map +1 -1
  77. package/dist/actions/list-model-endpoints.d.cts +39 -3
  78. package/dist/actions/list-model-endpoints.d.cts.map +1 -1
  79. package/dist/actions/list-model-endpoints.d.mts +39 -3
  80. package/dist/actions/list-model-endpoints.d.mts.map +1 -1
  81. package/dist/actions/list-model-endpoints.mjs +9 -9
  82. package/dist/actions/list-model-endpoints.mjs.map +1 -1
  83. package/dist/actions/list-providers.cjs +1 -1
  84. package/dist/actions/list-providers.cjs.map +1 -1
  85. package/dist/actions/list-providers.d.cts +9 -3
  86. package/dist/actions/list-providers.d.cts.map +1 -1
  87. package/dist/actions/list-providers.d.mts +9 -3
  88. package/dist/actions/list-providers.d.mts.map +1 -1
  89. package/dist/actions/list-providers.mjs +1 -1
  90. package/dist/actions/list-providers.mjs.map +1 -1
  91. package/dist/actions/list-user-models.cjs +8 -8
  92. package/dist/actions/list-user-models.cjs.map +1 -1
  93. package/dist/actions/list-user-models.d.cts +45 -3
  94. package/dist/actions/list-user-models.d.cts.map +1 -1
  95. package/dist/actions/list-user-models.d.mts +45 -3
  96. package/dist/actions/list-user-models.d.mts.map +1 -1
  97. package/dist/actions/list-user-models.mjs +8 -8
  98. package/dist/actions/list-user-models.mjs.map +1 -1
  99. package/dist/actions/list-zdr-endpoints.cjs +9 -9
  100. package/dist/actions/list-zdr-endpoints.cjs.map +1 -1
  101. package/dist/actions/list-zdr-endpoints.d.cts +43 -3
  102. package/dist/actions/list-zdr-endpoints.d.cts.map +1 -1
  103. package/dist/actions/list-zdr-endpoints.d.mts +43 -3
  104. package/dist/actions/list-zdr-endpoints.d.mts.map +1 -1
  105. package/dist/actions/list-zdr-endpoints.mjs +9 -9
  106. package/dist/actions/list-zdr-endpoints.mjs.map +1 -1
  107. package/dist/catalog.cjs +7 -1
  108. package/dist/catalog.cjs.map +1 -1
  109. package/dist/catalog.d.cts +8 -0
  110. package/dist/catalog.d.mts +8 -0
  111. package/dist/catalog.mjs +7 -1
  112. package/dist/catalog.mjs.map +1 -1
  113. package/package.json +2 -2
@@ -6,29 +6,29 @@ const OpenrouterGetCurrentKeyInput = zod.z.object({
6
6
  http_referer: zod.z.string().describe("The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.").optional()
7
7
  }).describe("Request for retrieving current API key information.");
8
8
  const OpenrouterGetCurrentKey_RateLimitSchema = zod.z.object({
9
- note: zod.z.string().describe("Deprecation note."),
10
- interval: zod.z.string().describe("Time interval for rate limit."),
11
- requests: zod.z.number().describe("Number of requests allowed.")
9
+ note: zod.z.string().describe("Deprecation note.").nullable(),
10
+ interval: zod.z.string().describe("Time interval for rate limit.").nullable(),
11
+ requests: zod.z.number().describe("Number of requests allowed.").nullable()
12
12
  }).describe("Legacy rate limit information (deprecated).");
13
13
  const OpenrouterGetCurrentKey_KeyDataSchema = zod.z.object({
14
- label: zod.z.string().describe("Human-readable label for the API key."),
14
+ label: zod.z.string().describe("Human-readable label for the API key.").nullable(),
15
15
  limit: zod.z.number().describe("Spending limit for the API key in USD.").nullable().optional(),
16
- usage: zod.z.number().describe("Total OpenRouter credit usage (in USD) for the API key."),
17
- byok_usage: zod.z.number().describe("Total external BYOK usage (in USD) for the API key."),
16
+ usage: zod.z.number().describe("Total OpenRouter credit usage (in USD) for the API key.").nullable(),
17
+ byok_usage: zod.z.number().describe("Total external BYOK usage (in USD) for the API key.").nullable(),
18
18
  expires_at: zod.z.string().describe("ISO 8601 UTC timestamp when the API key expires, or null if no expiration.").nullable().optional(),
19
19
  rate_limit: OpenrouterGetCurrentKey_RateLimitSchema.nullable(),
20
20
  limit_reset: zod.z.string().describe("Type of limit reset for the API key.").nullable().optional(),
21
- usage_daily: zod.z.number().describe("OpenRouter credit usage (in USD) for the current UTC day."),
22
- is_free_tier: zod.z.boolean().describe("Whether this is a free tier API key."),
23
- usage_weekly: zod.z.number().describe("OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)."),
24
- usage_monthly: zod.z.number().describe("OpenRouter credit usage (in USD) for the current UTC month."),
21
+ usage_daily: zod.z.number().describe("OpenRouter credit usage (in USD) for the current UTC day.").nullable(),
22
+ is_free_tier: zod.z.boolean().describe("Whether this is a free tier API key.").nullable(),
23
+ usage_weekly: zod.z.number().describe("OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday).").nullable(),
24
+ usage_monthly: zod.z.number().describe("OpenRouter credit usage (in USD) for the current UTC month.").nullable(),
25
25
  limit_remaining: zod.z.number().describe("Remaining spending limit in USD.").nullable().optional(),
26
- byok_usage_daily: zod.z.number().describe("External BYOK usage (in USD) for the current UTC day."),
27
- byok_usage_weekly: zod.z.number().describe("External BYOK usage (in USD) for the current UTC week (Monday-Sunday)."),
28
- is_management_key: zod.z.boolean().describe("Whether this is a management key."),
29
- byok_usage_monthly: zod.z.number().describe("External BYOK usage (in USD) for current UTC month."),
30
- is_provisioning_key: zod.z.boolean().describe("Whether this is a provisioning key."),
31
- include_byok_in_limit: zod.z.boolean().describe("Whether to include external BYOK usage in the credit limit.")
26
+ byok_usage_daily: zod.z.number().describe("External BYOK usage (in USD) for the current UTC day.").nullable(),
27
+ byok_usage_weekly: zod.z.number().describe("External BYOK usage (in USD) for the current UTC week (Monday-Sunday).").nullable(),
28
+ is_management_key: zod.z.boolean().describe("Whether this is a management key.").nullable(),
29
+ byok_usage_monthly: zod.z.number().describe("External BYOK usage (in USD) for current UTC month.").nullable(),
30
+ is_provisioning_key: zod.z.boolean().describe("Whether this is a provisioning key.").nullable(),
31
+ include_byok_in_limit: zod.z.boolean().describe("Whether to include external BYOK usage in the credit limit.").nullable()
32
32
  }).describe("API key information.");
33
33
  const OpenrouterGetCurrentKeyOutput = zod.z.object({ data: OpenrouterGetCurrentKey_KeyDataSchema.nullable() }).describe("Response containing current API key information.");
34
34
  const openrouterGetCurrentKey = require_action.action("OPENROUTER_GET_CURRENT_KEY", {
@@ -1 +1 @@
1
- {"version":3,"file":"get-current-key.cjs","names":["z","action"],"sources":["../../src/actions/get-current-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetCurrentKeyInput: z.ZodTypeAny = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request for retrieving current API key information.\");\nconst OpenrouterGetCurrentKey_RateLimitSchema: z.ZodTypeAny = z.object({\n note: z.string().describe(\"Deprecation note.\"),\n interval: z.string().describe(\"Time interval for rate limit.\"),\n requests: z.number().describe(\"Number of requests allowed.\"),\n}).describe(\"Legacy rate limit information (deprecated).\");\nconst OpenrouterGetCurrentKey_KeyDataSchema: z.ZodTypeAny = z.object({\n label: z.string().describe(\"Human-readable label for the API key.\"),\n limit: z.number().describe(\"Spending limit for the API key in USD.\").nullable().optional(),\n usage: z.number().describe(\"Total OpenRouter credit usage (in USD) for the API key.\"),\n byok_usage: z.number().describe(\"Total external BYOK usage (in USD) for the API key.\"),\n expires_at: z.string().describe(\"ISO 8601 UTC timestamp when the API key expires, or null if no expiration.\").nullable().optional(),\n rate_limit: OpenrouterGetCurrentKey_RateLimitSchema.nullable(),\n limit_reset: z.string().describe(\"Type of limit reset for the API key.\").nullable().optional(),\n usage_daily: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC day.\"),\n is_free_tier: z.boolean().describe(\"Whether this is a free tier API key.\"),\n usage_weekly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday).\"),\n usage_monthly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC month.\"),\n limit_remaining: z.number().describe(\"Remaining spending limit in USD.\").nullable().optional(),\n byok_usage_daily: z.number().describe(\"External BYOK usage (in USD) for the current UTC day.\"),\n byok_usage_weekly: z.number().describe(\"External BYOK usage (in USD) for the current UTC week (Monday-Sunday).\"),\n is_management_key: z.boolean().describe(\"Whether this is a management key.\"),\n byok_usage_monthly: z.number().describe(\"External BYOK usage (in USD) for current UTC month.\"),\n is_provisioning_key: z.boolean().describe(\"Whether this is a provisioning key.\"),\n include_byok_in_limit: z.boolean().describe(\"Whether to include external BYOK usage in the credit limit.\"),\n}).describe(\"API key information.\");\nexport const OpenrouterGetCurrentKeyOutput: z.ZodTypeAny = z.object({\n data: OpenrouterGetCurrentKey_KeyDataSchema.nullable(),\n}).describe(\"Response containing current API key information.\");\n\nexport const openrouterGetCurrentKey = action(\"OPENROUTER_GET_CURRENT_KEY\", {\n slug: \"openrouter-get-current-key\",\n name: \"Get Current Key\",\n description: \"Tool to get information about the currently authenticated API key. Use to check usage limits, spending, and key metadata.\",\n input: OpenrouterGetCurrentKeyInput,\n output: OpenrouterGetCurrentKeyOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6CA,IAAAA,EAAE,OAAO;CACjE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACtI,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACjM,CAAC,CAAC,CAAC,SAAS,qDAAqD;AACjE,MAAM,0CAAwDA,IAAAA,EAAE,OAAO;CACrE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB;CAC7C,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC7D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;AAC7D,CAAC,CAAC,CAAC,SAAS,6CAA6C;AACzD,MAAM,wCAAsDA,IAAAA,EAAE,OAAO;CACnE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,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AAO,EAClE,MAAM,sCAAsC,SAAS,EACvD,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAE9D,MAAa,0BAA0BC,eAAAA,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"get-current-key.cjs","names":["z","action"],"sources":["../../src/actions/get-current-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetCurrentKeyInput = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request for retrieving current API key information.\");\nconst OpenrouterGetCurrentKey_RateLimitSchema = z.object({\n note: z.string().describe(\"Deprecation note.\").nullable(),\n interval: z.string().describe(\"Time interval for rate limit.\").nullable(),\n requests: z.number().describe(\"Number of requests allowed.\").nullable(),\n}).describe(\"Legacy rate limit information (deprecated).\");\nconst OpenrouterGetCurrentKey_KeyDataSchema = z.object({\n label: z.string().describe(\"Human-readable label for the API key.\").nullable(),\n limit: z.number().describe(\"Spending limit for the API key in USD.\").nullable().optional(),\n usage: z.number().describe(\"Total OpenRouter credit usage (in USD) for the API key.\").nullable(),\n byok_usage: z.number().describe(\"Total external BYOK usage (in USD) for the API key.\").nullable(),\n expires_at: z.string().describe(\"ISO 8601 UTC timestamp when the API key expires, or null if no expiration.\").nullable().optional(),\n rate_limit: OpenrouterGetCurrentKey_RateLimitSchema.nullable(),\n limit_reset: z.string().describe(\"Type of limit reset for the API key.\").nullable().optional(),\n usage_daily: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC day.\").nullable(),\n is_free_tier: z.boolean().describe(\"Whether this is a free tier API key.\").nullable(),\n usage_weekly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday).\").nullable(),\n usage_monthly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC month.\").nullable(),\n limit_remaining: z.number().describe(\"Remaining spending limit in USD.\").nullable().optional(),\n byok_usage_daily: z.number().describe(\"External BYOK usage (in USD) for the current UTC day.\").nullable(),\n byok_usage_weekly: z.number().describe(\"External BYOK usage (in USD) for the current UTC week (Monday-Sunday).\").nullable(),\n is_management_key: z.boolean().describe(\"Whether this is a management key.\").nullable(),\n byok_usage_monthly: z.number().describe(\"External BYOK usage (in USD) for current UTC month.\").nullable(),\n is_provisioning_key: z.boolean().describe(\"Whether this is a provisioning key.\").nullable(),\n include_byok_in_limit: z.boolean().describe(\"Whether to include external BYOK usage in the credit limit.\").nullable(),\n}).describe(\"API key information.\");\nexport const OpenrouterGetCurrentKeyOutput = z.object({\n data: OpenrouterGetCurrentKey_KeyDataSchema.nullable(),\n}).describe(\"Response containing current API key information.\");\n\nexport const openrouterGetCurrentKey = action(\"OPENROUTER_GET_CURRENT_KEY\", {\n slug: \"openrouter-get-current-key\",\n name: \"Get Current Key\",\n description: \"Tool to get information about the currently authenticated API key. Use to check usage limits, spending, and key metadata.\",\n input: OpenrouterGetCurrentKeyInput,\n output: OpenrouterGetCurrentKeyOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACtI,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACjM,CAAC,CAAC,CAAC,SAAS,qDAAqD;AACjE,MAAM,0CAA0CA,IAAAA,EAAE,OAAO;CACvD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS;CACxD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;CACxE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,S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,mBAAmBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACtF,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACxG,qBAAqBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CAC1F,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;AACtH,CAAC,CAAC,CAAC,SAAS,sBAAsB;AAClC,MAAa,gCAAgCA,IAAAA,EAAE,OAAO,EACpD,MAAM,sCAAsC,SAAS,EACvD,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAE9D,MAAa,0BAA0BC,eAAAA,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,40 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-current-key.d.ts
4
- declare const OpenrouterGetCurrentKeyInput: z.ZodTypeAny;
5
- declare const OpenrouterGetCurrentKeyOutput: z.ZodTypeAny;
6
- declare const openrouterGetCurrentKey: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const OpenrouterGetCurrentKeyInput: z.ZodObject<{
5
+ x_title: z.ZodOptional<z.ZodString>;
6
+ http_referer: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ declare const OpenrouterGetCurrentKeyOutput: z.ZodObject<{
9
+ data: z.ZodNullable<z.ZodObject<{
10
+ label: z.ZodNullable<z.ZodString>;
11
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12
+ usage: z.ZodNullable<z.ZodNumber>;
13
+ byok_usage: z.ZodNullable<z.ZodNumber>;
14
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ rate_limit: z.ZodNullable<z.ZodObject<{
16
+ note: z.ZodNullable<z.ZodString>;
17
+ interval: z.ZodNullable<z.ZodString>;
18
+ requests: z.ZodNullable<z.ZodNumber>;
19
+ }, z.core.$strip>>;
20
+ limit_reset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ usage_daily: z.ZodNullable<z.ZodNumber>;
22
+ is_free_tier: z.ZodNullable<z.ZodBoolean>;
23
+ usage_weekly: z.ZodNullable<z.ZodNumber>;
24
+ usage_monthly: z.ZodNullable<z.ZodNumber>;
25
+ limit_remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ byok_usage_daily: z.ZodNullable<z.ZodNumber>;
27
+ byok_usage_weekly: z.ZodNullable<z.ZodNumber>;
28
+ is_management_key: z.ZodNullable<z.ZodBoolean>;
29
+ byok_usage_monthly: z.ZodNullable<z.ZodNumber>;
30
+ is_provisioning_key: z.ZodNullable<z.ZodBoolean>;
31
+ include_byok_in_limit: z.ZodNullable<z.ZodBoolean>;
32
+ }, z.core.$strip>>;
33
+ }, z.core.$strip>;
34
+ declare const openrouterGetCurrentKey: import("@keystrokehq/action").WorkflowActionDefinition<{
35
+ x_title?: string | undefined;
36
+ http_referer?: string | undefined;
37
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
38
  //#endregion
8
39
  export { openrouterGetCurrentKey };
9
40
  //# sourceMappingURL=get-current-key.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-current-key.d.cts","names":[],"sources":["../../src/actions/get-current-key.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAGqB;AAAA,cA0BrD,6BAAA,EAA+B,CAAA,CAAE,UAEiB;AAAA,cAElD,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"get-current-key.d.cts","names":[],"sources":["../../src/actions/get-current-key.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;cA6B5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAI7B,uBAAA,gCAAuB,wBAAA"}
@@ -1,9 +1,40 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-current-key.d.ts
4
- declare const OpenrouterGetCurrentKeyInput: z.ZodTypeAny;
5
- declare const OpenrouterGetCurrentKeyOutput: z.ZodTypeAny;
6
- declare const openrouterGetCurrentKey: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const OpenrouterGetCurrentKeyInput: z.ZodObject<{
5
+ x_title: z.ZodOptional<z.ZodString>;
6
+ http_referer: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ declare const OpenrouterGetCurrentKeyOutput: z.ZodObject<{
9
+ data: z.ZodNullable<z.ZodObject<{
10
+ label: z.ZodNullable<z.ZodString>;
11
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12
+ usage: z.ZodNullable<z.ZodNumber>;
13
+ byok_usage: z.ZodNullable<z.ZodNumber>;
14
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ rate_limit: z.ZodNullable<z.ZodObject<{
16
+ note: z.ZodNullable<z.ZodString>;
17
+ interval: z.ZodNullable<z.ZodString>;
18
+ requests: z.ZodNullable<z.ZodNumber>;
19
+ }, z.core.$strip>>;
20
+ limit_reset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ usage_daily: z.ZodNullable<z.ZodNumber>;
22
+ is_free_tier: z.ZodNullable<z.ZodBoolean>;
23
+ usage_weekly: z.ZodNullable<z.ZodNumber>;
24
+ usage_monthly: z.ZodNullable<z.ZodNumber>;
25
+ limit_remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ byok_usage_daily: z.ZodNullable<z.ZodNumber>;
27
+ byok_usage_weekly: z.ZodNullable<z.ZodNumber>;
28
+ is_management_key: z.ZodNullable<z.ZodBoolean>;
29
+ byok_usage_monthly: z.ZodNullable<z.ZodNumber>;
30
+ is_provisioning_key: z.ZodNullable<z.ZodBoolean>;
31
+ include_byok_in_limit: z.ZodNullable<z.ZodBoolean>;
32
+ }, z.core.$strip>>;
33
+ }, z.core.$strip>;
34
+ declare const openrouterGetCurrentKey: import("@keystrokehq/action").WorkflowActionDefinition<{
35
+ x_title?: string | undefined;
36
+ http_referer?: string | undefined;
37
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
38
  //#endregion
8
39
  export { openrouterGetCurrentKey };
9
40
  //# sourceMappingURL=get-current-key.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-current-key.d.mts","names":[],"sources":["../../src/actions/get-current-key.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAGqB;AAAA,cA0BrD,6BAAA,EAA+B,CAAA,CAAE,UAEiB;AAAA,cAElD,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"get-current-key.d.mts","names":[],"sources":["../../src/actions/get-current-key.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;cA6B5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAI7B,uBAAA,gCAAuB,wBAAA"}
@@ -6,29 +6,29 @@ const OpenrouterGetCurrentKeyInput = z.object({
6
6
  http_referer: z.string().describe("The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.").optional()
7
7
  }).describe("Request for retrieving current API key information.");
8
8
  const OpenrouterGetCurrentKey_RateLimitSchema = z.object({
9
- note: z.string().describe("Deprecation note."),
10
- interval: z.string().describe("Time interval for rate limit."),
11
- requests: z.number().describe("Number of requests allowed.")
9
+ note: z.string().describe("Deprecation note.").nullable(),
10
+ interval: z.string().describe("Time interval for rate limit.").nullable(),
11
+ requests: z.number().describe("Number of requests allowed.").nullable()
12
12
  }).describe("Legacy rate limit information (deprecated).");
13
13
  const OpenrouterGetCurrentKey_KeyDataSchema = z.object({
14
- label: z.string().describe("Human-readable label for the API key."),
14
+ label: z.string().describe("Human-readable label for the API key.").nullable(),
15
15
  limit: z.number().describe("Spending limit for the API key in USD.").nullable().optional(),
16
- usage: z.number().describe("Total OpenRouter credit usage (in USD) for the API key."),
17
- byok_usage: z.number().describe("Total external BYOK usage (in USD) for the API key."),
16
+ usage: z.number().describe("Total OpenRouter credit usage (in USD) for the API key.").nullable(),
17
+ byok_usage: z.number().describe("Total external BYOK usage (in USD) for the API key.").nullable(),
18
18
  expires_at: z.string().describe("ISO 8601 UTC timestamp when the API key expires, or null if no expiration.").nullable().optional(),
19
19
  rate_limit: OpenrouterGetCurrentKey_RateLimitSchema.nullable(),
20
20
  limit_reset: z.string().describe("Type of limit reset for the API key.").nullable().optional(),
21
- usage_daily: z.number().describe("OpenRouter credit usage (in USD) for the current UTC day."),
22
- is_free_tier: z.boolean().describe("Whether this is a free tier API key."),
23
- usage_weekly: z.number().describe("OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)."),
24
- usage_monthly: z.number().describe("OpenRouter credit usage (in USD) for the current UTC month."),
21
+ usage_daily: z.number().describe("OpenRouter credit usage (in USD) for the current UTC day.").nullable(),
22
+ is_free_tier: z.boolean().describe("Whether this is a free tier API key.").nullable(),
23
+ usage_weekly: z.number().describe("OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday).").nullable(),
24
+ usage_monthly: z.number().describe("OpenRouter credit usage (in USD) for the current UTC month.").nullable(),
25
25
  limit_remaining: z.number().describe("Remaining spending limit in USD.").nullable().optional(),
26
- byok_usage_daily: z.number().describe("External BYOK usage (in USD) for the current UTC day."),
27
- byok_usage_weekly: z.number().describe("External BYOK usage (in USD) for the current UTC week (Monday-Sunday)."),
28
- is_management_key: z.boolean().describe("Whether this is a management key."),
29
- byok_usage_monthly: z.number().describe("External BYOK usage (in USD) for current UTC month."),
30
- is_provisioning_key: z.boolean().describe("Whether this is a provisioning key."),
31
- include_byok_in_limit: z.boolean().describe("Whether to include external BYOK usage in the credit limit.")
26
+ byok_usage_daily: z.number().describe("External BYOK usage (in USD) for the current UTC day.").nullable(),
27
+ byok_usage_weekly: z.number().describe("External BYOK usage (in USD) for the current UTC week (Monday-Sunday).").nullable(),
28
+ is_management_key: z.boolean().describe("Whether this is a management key.").nullable(),
29
+ byok_usage_monthly: z.number().describe("External BYOK usage (in USD) for current UTC month.").nullable(),
30
+ is_provisioning_key: z.boolean().describe("Whether this is a provisioning key.").nullable(),
31
+ include_byok_in_limit: z.boolean().describe("Whether to include external BYOK usage in the credit limit.").nullable()
32
32
  }).describe("API key information.");
33
33
  const openrouterGetCurrentKey = action("OPENROUTER_GET_CURRENT_KEY", {
34
34
  slug: "openrouter-get-current-key",
@@ -1 +1 @@
1
- {"version":3,"file":"get-current-key.mjs","names":[],"sources":["../../src/actions/get-current-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetCurrentKeyInput: z.ZodTypeAny = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request for retrieving current API key information.\");\nconst OpenrouterGetCurrentKey_RateLimitSchema: z.ZodTypeAny = z.object({\n note: z.string().describe(\"Deprecation note.\"),\n interval: z.string().describe(\"Time interval for rate limit.\"),\n requests: z.number().describe(\"Number of requests allowed.\"),\n}).describe(\"Legacy rate limit information (deprecated).\");\nconst OpenrouterGetCurrentKey_KeyDataSchema: z.ZodTypeAny = z.object({\n label: z.string().describe(\"Human-readable label for the API key.\"),\n limit: z.number().describe(\"Spending limit for the API key in USD.\").nullable().optional(),\n usage: z.number().describe(\"Total OpenRouter credit usage (in USD) for the API key.\"),\n byok_usage: z.number().describe(\"Total external BYOK usage (in USD) for the API key.\"),\n expires_at: z.string().describe(\"ISO 8601 UTC timestamp when the API key expires, or null if no expiration.\").nullable().optional(),\n rate_limit: OpenrouterGetCurrentKey_RateLimitSchema.nullable(),\n limit_reset: z.string().describe(\"Type of limit reset for the API key.\").nullable().optional(),\n usage_daily: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC day.\"),\n is_free_tier: z.boolean().describe(\"Whether this is a free tier API key.\"),\n usage_weekly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday).\"),\n usage_monthly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC month.\"),\n limit_remaining: z.number().describe(\"Remaining spending limit in USD.\").nullable().optional(),\n byok_usage_daily: z.number().describe(\"External BYOK usage (in USD) for the current UTC day.\"),\n byok_usage_weekly: z.number().describe(\"External BYOK usage (in USD) for the current UTC week (Monday-Sunday).\"),\n is_management_key: z.boolean().describe(\"Whether this is a management key.\"),\n byok_usage_monthly: z.number().describe(\"External BYOK usage (in USD) for current UTC month.\"),\n is_provisioning_key: z.boolean().describe(\"Whether this is a provisioning key.\"),\n include_byok_in_limit: z.boolean().describe(\"Whether to include external BYOK usage in the credit limit.\"),\n}).describe(\"API key information.\");\nexport const OpenrouterGetCurrentKeyOutput: z.ZodTypeAny = z.object({\n data: OpenrouterGetCurrentKey_KeyDataSchema.nullable(),\n}).describe(\"Response containing current API key information.\");\n\nexport const openrouterGetCurrentKey = action(\"OPENROUTER_GET_CURRENT_KEY\", {\n slug: \"openrouter-get-current-key\",\n name: \"Get Current Key\",\n description: \"Tool to get information about the currently authenticated API key. Use to check usage limits, spending, and key metadata.\",\n input: OpenrouterG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CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CAC7F,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,wEAAwE;CAC/G,mBAAmB,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC;CAC3E,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD;CAC7F,qBAAqB,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC;CAC/E,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,6DAA6D;AAC3G,CAAC,CAAC,CAAC,SAAS,sBAAsB;AAKlC,MAAa,0BAA0B,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATyD,EAAE,OAAO,EAClE,MAAM,sCAAsC,SAAS,EACvD,CAAC,CAAC,CAAC,SAAS,kDAOF;AACV,CAAC"}
1
+ {"version":3,"file":"get-current-key.mjs","names":[],"sources":["../../src/actions/get-current-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetCurrentKeyInput = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request for retrieving current API key information.\");\nconst OpenrouterGetCurrentKey_RateLimitSchema = z.object({\n note: z.string().describe(\"Deprecation note.\").nullable(),\n interval: z.string().describe(\"Time interval for rate limit.\").nullable(),\n requests: z.number().describe(\"Number of requests allowed.\").nullable(),\n}).describe(\"Legacy rate limit information (deprecated).\");\nconst OpenrouterGetCurrentKey_KeyDataSchema = z.object({\n label: z.string().describe(\"Human-readable label for the API key.\").nullable(),\n limit: z.number().describe(\"Spending limit for the API key in USD.\").nullable().optional(),\n usage: z.number().describe(\"Total OpenRouter credit usage (in USD) for the API key.\").nullable(),\n byok_usage: z.number().describe(\"Total external BYOK usage (in USD) for the API key.\").nullable(),\n expires_at: z.string().describe(\"ISO 8601 UTC timestamp when the API key expires, or null if no expiration.\").nullable().optional(),\n rate_limit: OpenrouterGetCurrentKey_RateLimitSchema.nullable(),\n limit_reset: z.string().describe(\"Type of limit reset for the API key.\").nullable().optional(),\n usage_daily: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC day.\").nullable(),\n is_free_tier: z.boolean().describe(\"Whether this is a free tier API key.\").nullable(),\n usage_weekly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday).\").nullable(),\n usage_monthly: z.number().describe(\"OpenRouter credit usage (in USD) for the current UTC month.\").nullable(),\n limit_remaining: z.number().describe(\"Remaining spending limit in USD.\").nullable().optional(),\n byok_usage_daily: z.number().describe(\"External BYOK usage (in USD) for the current UTC day.\").nullable(),\n byok_usage_weekly: z.number().describe(\"External BYOK usage (in USD) for the current UTC week (Monday-Sunday).\").nullable(),\n is_management_key: z.boolean().describe(\"Whether this is a management key.\").nullable(),\n byok_usage_monthly: z.number().describe(\"External BYOK usage (in USD) for current UTC month.\").nullable(),\n is_provisioning_key: z.boolean().describe(\"Whether this is a provisioning key.\").nullable(),\n include_byok_in_limit: z.boolean().describe(\"Whether to include external BYOK usage in the credit limit.\").nullable(),\n}).describe(\"API key information.\");\nexport const OpenrouterGetCurrentKeyOutput = z.object({\n data: OpenrouterGetCurrentKey_KeyDataSchema.nullable(),\n}).describe(\"Response containing current API key information.\");\n\nexport const openrouterGetCurrentKey = action(\"OPENROUTER_GET_CURRENT_KEY\", {\n slug: \"openrouter-get-current-key\",\n name: \"Get Current Key\",\n description: \"Tool to get information about the currently authenticated API key. Use to check usage limits, spending, and key metadata.\",\n input: OpenrouterGetCurrentKeyInput,\n output: OpenrouterGetCurrentKeyOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+B,EAAE,OAAO;CACnD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,C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O,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACxG,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,wEAAwE,CAAC,CAAC,SAAS;CAC1H,mBAAmB,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACtF,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACxG,qBAAqB,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CAC1F,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;AACtH,CAAC,CAAC,CAAC,SAAS,sBAAsB;AAKlC,MAAa,0BAA0B,OAAO,8BAA8B;CAC1E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT2C,EAAE,OAAO,EACpD,MAAM,sCAAsC,SAAS,EACvD,CAAC,CAAC,CAAC,SAAS,kDAOF;AACV,CAAC"}
@@ -3,33 +3,33 @@ let zod = require("zod");
3
3
  //#region src/actions/get-generation.ts
4
4
  const OpenrouterGetGenerationInput = zod.z.object({ id: zod.z.string().describe("Unique identifier of the generation to retrieve.") }).describe("Request model for retrieving a generation by its unique ID.");
5
5
  const OpenrouterGetGeneration_GenerationDataSchema = zod.z.object({
6
- id: zod.z.string().describe("Unique identifier of the generation."),
7
- model: zod.z.string().describe("Model used to generate the response."),
8
- usage: zod.z.number().describe("Normalized token usage (sum of prompt and completion tokens)."),
6
+ id: zod.z.string().describe("Unique identifier of the generation.").nullable(),
7
+ model: zod.z.string().describe("Model used to generate the response.").nullable(),
8
+ usage: zod.z.number().describe("Normalized token usage (sum of prompt and completion tokens).").nullable(),
9
9
  app_id: zod.z.number().int().describe("Application identifier associated with this generation.").nullable().optional(),
10
- origin: zod.z.string().describe("Source/origin of the request."),
11
- is_byok: zod.z.boolean().describe("Indicates if a BYOK key was used."),
12
- latency: zod.z.number().int().describe("Total latency in milliseconds for response generation."),
13
- streamed: zod.z.boolean().describe("Whether this generation was streamed."),
14
- cancelled: zod.z.boolean().describe("Whether this generation was cancelled before completion."),
15
- created_at: zod.z.string().describe("Timestamp when the generation was created."),
16
- total_cost: zod.z.number().describe("Total cost incurred for this generation."),
10
+ origin: zod.z.string().describe("Source/origin of the request.").nullable(),
11
+ is_byok: zod.z.boolean().describe("Indicates if a BYOK key was used.").nullable(),
12
+ latency: zod.z.number().int().describe("Total latency in milliseconds for response generation.").nullable(),
13
+ streamed: zod.z.boolean().describe("Whether this generation was streamed.").nullable(),
14
+ cancelled: zod.z.boolean().describe("Whether this generation was cancelled before completion.").nullable(),
15
+ created_at: zod.z.string().describe("Timestamp when the generation was created.").nullable(),
16
+ total_cost: zod.z.number().describe("Total cost incurred for this generation.").nullable(),
17
17
  upstream_id: zod.z.string().describe("Upstream provider's generation ID, if any.").nullable().optional(),
18
- finish_reason: zod.z.string().describe("Normalized finish reason (e.g., 'stop', 'length')."),
19
- provider_name: zod.z.string().describe("Name of the upstream provider used."),
20
- tokens_prompt: zod.z.number().int().describe("Number of tokens in the prompt."),
18
+ finish_reason: zod.z.string().describe("Normalized finish reason (e.g., 'stop', 'length').").nullable(),
19
+ provider_name: zod.z.string().describe("Name of the upstream provider used.").nullable(),
20
+ tokens_prompt: zod.z.number().int().describe("Number of tokens in the prompt.").nullable(),
21
21
  cache_discount: zod.z.number().describe("Discount applied from cache hits, if any.").nullable().optional(),
22
- generation_time: zod.z.number().int().describe("Time in milliseconds taken by the model to generate the content."),
22
+ generation_time: zod.z.number().int().describe("Time in milliseconds taken by the model to generate the content.").nullable(),
23
23
  num_media_prompt: zod.z.number().int().describe("Number of media items in the prompt.").nullable().optional(),
24
- tokens_completion: zod.z.number().int().describe("Number of tokens in the completion."),
24
+ tokens_completion: zod.z.number().int().describe("Number of tokens in the completion.").nullable(),
25
25
  moderation_latency: zod.z.number().int().describe("Latency in milliseconds spent on moderation, if any.").nullable().optional(),
26
26
  num_search_results: zod.z.number().int().describe("Number of search results used, if any.").nullable().optional(),
27
- native_finish_reason: zod.z.string().describe("Raw finish reason returned by the model."),
28
- native_tokens_prompt: zod.z.number().int().describe("Prompt tokens counted by the provider's tokenizer."),
27
+ native_finish_reason: zod.z.string().describe("Raw finish reason returned by the model.").nullable(),
28
+ native_tokens_prompt: zod.z.number().int().describe("Prompt tokens counted by the provider's tokenizer.").nullable(),
29
29
  num_media_completion: zod.z.number().int().describe("Number of media items in the completion.").nullable().optional(),
30
- native_tokens_reasoning: zod.z.number().int().describe("Tokens used for internal reasoning by the model."),
30
+ native_tokens_reasoning: zod.z.number().int().describe("Tokens used for internal reasoning by the model.").nullable(),
31
31
  upstream_inference_cost: zod.z.number().describe("Cost charged by the upstream provider.").nullable().optional(),
32
- native_tokens_completion: zod.z.number().int().describe("Completion tokens counted by the provider's tokenizer.")
32
+ native_tokens_completion: zod.z.number().int().describe("Completion tokens counted by the provider's tokenizer.").nullable()
33
33
  }).describe("Detailed metadata for a specific generation request.");
34
34
  const OpenrouterGetGenerationOutput = zod.z.object({ data: OpenrouterGetGeneration_GenerationDataSchema.nullable() }).describe("Response model containing the data for a retrieved generation.");
35
35
  const openrouterGetGeneration = require_action.action("OPENROUTER_GET_GENERATION", {
@@ -1 +1 @@
1
- {"version":3,"file":"get-generation.cjs","names":["z","action"],"sources":["../../src/actions/get-generation.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetGenerationInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the generation to retrieve.\"),\n}).describe(\"Request model for retrieving a generation by its unique ID.\");\nconst OpenrouterGetGeneration_GenerationDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the generation.\"),\n model: z.string().describe(\"Model used to generate the response.\"),\n usage: z.number().describe(\"Normalized token usage (sum of prompt and completion tokens).\"),\n app_id: z.number().int().describe(\"Application identifier associated with this generation.\").nullable().optional(),\n origin: z.string().describe(\"Source/origin of the request.\"),\n is_byok: z.boolean().describe(\"Indicates if a BYOK key was used.\"),\n latency: z.number().int().describe(\"Total latency in milliseconds for response generation.\"),\n streamed: z.boolean().describe(\"Whether this generation was streamed.\"),\n cancelled: z.boolean().describe(\"Whether this generation was cancelled before completion.\"),\n created_at: z.string().describe(\"Timestamp when the generation was created.\"),\n total_cost: z.number().describe(\"Total cost incurred for this generation.\"),\n upstream_id: z.string().describe(\"Upstream provider's generation ID, if any.\").nullable().optional(),\n finish_reason: z.string().describe(\"Normalized finish reason (e.g., 'stop', 'length').\"),\n provider_name: z.string().describe(\"Name of the upstream provider used.\"),\n tokens_prompt: z.number().int().describe(\"Number of tokens in the prompt.\"),\n cache_discount: z.number().describe(\"Discount applied from cache hits, if any.\").nullable().optional(),\n generation_time: z.number().int().describe(\"Time in milliseconds taken by the model to generate the content.\"),\n num_media_prompt: z.number().int().describe(\"Number of media items in the prompt.\").nullable().optional(),\n tokens_completion: z.number().int().describe(\"Number of tokens in the completion.\"),\n moderation_latency: z.number().int().describe(\"Latency in milliseconds spent on moderation, if any.\").nullable().optional(),\n num_search_results: z.number().int().describe(\"Number of search results used, if any.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Raw finish reason returned by the model.\"),\n native_tokens_prompt: z.number().int().describe(\"Prompt tokens counted by the provider's tokenizer.\"),\n num_media_completion: z.number().int().describe(\"Number of media items in the completion.\").nullable().optional(),\n native_tokens_reasoning: z.number().int().describe(\"Tokens used for internal reasoning by the model.\"),\n upstream_inference_cost: z.number().describe(\"Cost charged by the upstream provider.\").nullable().optional(),\n native_tokens_completion: z.number().int().describe(\"Completion tokens counted by the provider's tokenizer.\"),\n}).describe(\"Detailed metadata for a specific generation request.\");\nexport const OpenrouterGetGenerationOutput: z.ZodTypeAny = z.object({\n data: OpenrouterGetGeneration_GenerationDataSchema.nullable(),\n}).describe(\"Response model containing the data for a retrieved generation.\");\n\nexport const openrouterGetGeneration = action(\"OPENROUTER_GET_GENERATION\", {\n slug: \"openrouter-get-generation\",\n name: \"Get Generation\",\n description: \"Tool to retrieve a generation result by its unique ID. Use after a generation completes to fetch metadata like token counts, cost, and latency.\",\n input: OpenrouterGetGenerationInput,\n output: OpenrouterGetGenerationOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6CA,IAAAA,EAAE,OAAO,EACjE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,EAC5E,CAAC,CAAC,CAAC,SAAS,6DAA6D;AACzE,MAAM,+CAA6DA,IAAAA,EAAE,OAAO;CAC1E,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CAC9D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACjE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CAC1F,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC3D,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC;CACjE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD;CAC3F,UAAUA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;CACtE,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0DAA0D;CAC1F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CAC5E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAC1E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,S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C,SAAS,CAAC,CAAC,SAAS;CAC3G,0BAA0BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD;AAC9G,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAa,gCAA8CA,IAAAA,EAAE,OAAO,EAClE,MAAM,6CAA6C,SAAS,EAC9D,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAE5E,MAAa,0BAA0BC,eAAAA,OAAO,6BAA6B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"get-generation.cjs","names":["z","action"],"sources":["../../src/actions/get-generation.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetGenerationInput = z.object({\n id: z.string().describe(\"Unique identifier of the generation to retrieve.\"),\n}).describe(\"Request model for retrieving a generation by its unique ID.\");\nconst OpenrouterGetGeneration_GenerationDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the generation.\").nullable(),\n model: z.string().describe(\"Model used to generate the response.\").nullable(),\n usage: z.number().describe(\"Normalized token usage (sum of prompt and completion tokens).\").nullable(),\n app_id: z.number().int().describe(\"Application identifier associated with this generation.\").nullable().optional(),\n origin: z.string().describe(\"Source/origin of the request.\").nullable(),\n is_byok: z.boolean().describe(\"Indicates if a BYOK key was used.\").nullable(),\n latency: z.number().int().describe(\"Total latency in milliseconds for response generation.\").nullable(),\n streamed: z.boolean().describe(\"Whether this generation was streamed.\").nullable(),\n cancelled: z.boolean().describe(\"Whether this generation was cancelled before completion.\").nullable(),\n created_at: z.string().describe(\"Timestamp when the generation was created.\").nullable(),\n total_cost: z.number().describe(\"Total cost incurred for this generation.\").nullable(),\n upstream_id: z.string().describe(\"Upstream provider's generation ID, if any.\").nullable().optional(),\n finish_reason: z.string().describe(\"Normalized finish reason (e.g., 'stop', 'length').\").nullable(),\n provider_name: z.string().describe(\"Name of the upstream provider used.\").nullable(),\n tokens_prompt: z.number().int().describe(\"Number of tokens in the prompt.\").nullable(),\n cache_discount: z.number().describe(\"Discount applied from cache hits, if any.\").nullable().optional(),\n generation_time: z.number().int().describe(\"Time in milliseconds taken by the model to generate the content.\").nullable(),\n num_media_prompt: z.number().int().describe(\"Number of media items in the prompt.\").nullable().optional(),\n tokens_completion: z.number().int().describe(\"Number of tokens in the completion.\").nullable(),\n moderation_latency: z.number().int().describe(\"Latency in milliseconds spent on moderation, if any.\").nullable().optional(),\n num_search_results: z.number().int().describe(\"Number of search results used, if any.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Raw finish reason returned by the model.\").nullable(),\n native_tokens_prompt: z.number().int().describe(\"Prompt tokens counted by the provider's tokenizer.\").nullable(),\n num_media_completion: z.number().int().describe(\"Number of media items in the completion.\").nullable().optional(),\n native_tokens_reasoning: z.number().int().describe(\"Tokens used for internal reasoning by the model.\").nullable(),\n upstream_inference_cost: z.number().describe(\"Cost charged by the upstream provider.\").nullable().optional(),\n native_tokens_completion: z.number().int().describe(\"Completion tokens counted by the provider's tokenizer.\").nullable(),\n}).describe(\"Detailed metadata for a specific generation request.\");\nexport const OpenrouterGetGenerationOutput = z.object({\n data: OpenrouterGetGeneration_GenerationDataSchema.nullable(),\n}).describe(\"Response model containing the data for a retrieved generation.\");\n\nexport const openrouterGetGeneration = action(\"OPENROUTER_GET_GENERATION\", {\n slug: \"openrouter-get-generation\",\n name: \"Get Generation\",\n description: \"Tool to retrieve a generation result by its unique ID. Use after a generation completes to fetch metadata like token counts, cost, and latency.\",\n input: OpenrouterGetGenerationInput,\n output: OpenrouterGetGenerationOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO,EACnD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,EAC5E,CAAC,CAAC,CAAC,SAAS,6DAA6D;AACzE,MAAM,+CAA+CA,IAAAA,EAAE,OAAO;CAC5D,IAAIA,IAAAA,EAA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AC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAa,gCAAgCA,IAAAA,EAAE,OAAO,EACpD,MAAM,6CAA6C,SAAS,EAC9D,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAE5E,MAAa,0BAA0BC,eAAAA,OAAO,6BAA6B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,43 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-generation.d.ts
4
- declare const OpenrouterGetGenerationInput: z.ZodTypeAny;
5
- declare const OpenrouterGetGenerationOutput: z.ZodTypeAny;
6
- declare const openrouterGetGeneration: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const OpenrouterGetGenerationInput: z.ZodObject<{
5
+ id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ declare const OpenrouterGetGenerationOutput: z.ZodObject<{
8
+ data: z.ZodNullable<z.ZodObject<{
9
+ id: z.ZodNullable<z.ZodString>;
10
+ model: z.ZodNullable<z.ZodString>;
11
+ usage: z.ZodNullable<z.ZodNumber>;
12
+ app_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13
+ origin: z.ZodNullable<z.ZodString>;
14
+ is_byok: z.ZodNullable<z.ZodBoolean>;
15
+ latency: z.ZodNullable<z.ZodNumber>;
16
+ streamed: z.ZodNullable<z.ZodBoolean>;
17
+ cancelled: z.ZodNullable<z.ZodBoolean>;
18
+ created_at: z.ZodNullable<z.ZodString>;
19
+ total_cost: z.ZodNullable<z.ZodNumber>;
20
+ upstream_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ finish_reason: z.ZodNullable<z.ZodString>;
22
+ provider_name: z.ZodNullable<z.ZodString>;
23
+ tokens_prompt: z.ZodNullable<z.ZodNumber>;
24
+ cache_discount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ generation_time: z.ZodNullable<z.ZodNumber>;
26
+ num_media_prompt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
27
+ tokens_completion: z.ZodNullable<z.ZodNumber>;
28
+ moderation_latency: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
+ num_search_results: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
30
+ native_finish_reason: z.ZodNullable<z.ZodString>;
31
+ native_tokens_prompt: z.ZodNullable<z.ZodNumber>;
32
+ num_media_completion: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ native_tokens_reasoning: z.ZodNullable<z.ZodNumber>;
34
+ upstream_inference_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
35
+ native_tokens_completion: z.ZodNullable<z.ZodNumber>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
38
+ declare const openrouterGetGeneration: import("@keystrokehq/action").WorkflowActionDefinition<{
39
+ id: string;
40
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
41
  //#endregion
8
42
  export { openrouterGetGeneration };
9
43
  //# sourceMappingURL=get-generation.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-generation.d.cts","names":[],"sources":["../../src/actions/get-generation.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAE6B;AAAA,cA8B7D,6BAAA,EAA+B,CAAA,CAAE,UAE+B;AAAA,cAEhE,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"get-generation.d.cts","names":[],"sources":["../../src/actions/get-generation.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;cAgC5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAI7B,uBAAA,gCAAuB,wBAAA"}
@@ -1,9 +1,43 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-generation.d.ts
4
- declare const OpenrouterGetGenerationInput: z.ZodTypeAny;
5
- declare const OpenrouterGetGenerationOutput: z.ZodTypeAny;
6
- declare const openrouterGetGeneration: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const OpenrouterGetGenerationInput: z.ZodObject<{
5
+ id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ declare const OpenrouterGetGenerationOutput: z.ZodObject<{
8
+ data: z.ZodNullable<z.ZodObject<{
9
+ id: z.ZodNullable<z.ZodString>;
10
+ model: z.ZodNullable<z.ZodString>;
11
+ usage: z.ZodNullable<z.ZodNumber>;
12
+ app_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13
+ origin: z.ZodNullable<z.ZodString>;
14
+ is_byok: z.ZodNullable<z.ZodBoolean>;
15
+ latency: z.ZodNullable<z.ZodNumber>;
16
+ streamed: z.ZodNullable<z.ZodBoolean>;
17
+ cancelled: z.ZodNullable<z.ZodBoolean>;
18
+ created_at: z.ZodNullable<z.ZodString>;
19
+ total_cost: z.ZodNullable<z.ZodNumber>;
20
+ upstream_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ finish_reason: z.ZodNullable<z.ZodString>;
22
+ provider_name: z.ZodNullable<z.ZodString>;
23
+ tokens_prompt: z.ZodNullable<z.ZodNumber>;
24
+ cache_discount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ generation_time: z.ZodNullable<z.ZodNumber>;
26
+ num_media_prompt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
27
+ tokens_completion: z.ZodNullable<z.ZodNumber>;
28
+ moderation_latency: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
+ num_search_results: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
30
+ native_finish_reason: z.ZodNullable<z.ZodString>;
31
+ native_tokens_prompt: z.ZodNullable<z.ZodNumber>;
32
+ num_media_completion: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ native_tokens_reasoning: z.ZodNullable<z.ZodNumber>;
34
+ upstream_inference_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
35
+ native_tokens_completion: z.ZodNullable<z.ZodNumber>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
38
+ declare const openrouterGetGeneration: import("@keystrokehq/action").WorkflowActionDefinition<{
39
+ id: string;
40
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
41
  //#endregion
8
42
  export { openrouterGetGeneration };
9
43
  //# sourceMappingURL=get-generation.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-generation.d.mts","names":[],"sources":["../../src/actions/get-generation.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAE6B;AAAA,cA8B7D,6BAAA,EAA+B,CAAA,CAAE,UAE+B;AAAA,cAEhE,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"get-generation.d.mts","names":[],"sources":["../../src/actions/get-generation.ts"],"mappings":";;;cAIa,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;cAgC5B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAI7B,uBAAA,gCAAuB,wBAAA"}
@@ -3,33 +3,33 @@ import { z } from "zod";
3
3
  //#region src/actions/get-generation.ts
4
4
  const OpenrouterGetGenerationInput = z.object({ id: z.string().describe("Unique identifier of the generation to retrieve.") }).describe("Request model for retrieving a generation by its unique ID.");
5
5
  const OpenrouterGetGeneration_GenerationDataSchema = z.object({
6
- id: z.string().describe("Unique identifier of the generation."),
7
- model: z.string().describe("Model used to generate the response."),
8
- usage: z.number().describe("Normalized token usage (sum of prompt and completion tokens)."),
6
+ id: z.string().describe("Unique identifier of the generation.").nullable(),
7
+ model: z.string().describe("Model used to generate the response.").nullable(),
8
+ usage: z.number().describe("Normalized token usage (sum of prompt and completion tokens).").nullable(),
9
9
  app_id: z.number().int().describe("Application identifier associated with this generation.").nullable().optional(),
10
- origin: z.string().describe("Source/origin of the request."),
11
- is_byok: z.boolean().describe("Indicates if a BYOK key was used."),
12
- latency: z.number().int().describe("Total latency in milliseconds for response generation."),
13
- streamed: z.boolean().describe("Whether this generation was streamed."),
14
- cancelled: z.boolean().describe("Whether this generation was cancelled before completion."),
15
- created_at: z.string().describe("Timestamp when the generation was created."),
16
- total_cost: z.number().describe("Total cost incurred for this generation."),
10
+ origin: z.string().describe("Source/origin of the request.").nullable(),
11
+ is_byok: z.boolean().describe("Indicates if a BYOK key was used.").nullable(),
12
+ latency: z.number().int().describe("Total latency in milliseconds for response generation.").nullable(),
13
+ streamed: z.boolean().describe("Whether this generation was streamed.").nullable(),
14
+ cancelled: z.boolean().describe("Whether this generation was cancelled before completion.").nullable(),
15
+ created_at: z.string().describe("Timestamp when the generation was created.").nullable(),
16
+ total_cost: z.number().describe("Total cost incurred for this generation.").nullable(),
17
17
  upstream_id: z.string().describe("Upstream provider's generation ID, if any.").nullable().optional(),
18
- finish_reason: z.string().describe("Normalized finish reason (e.g., 'stop', 'length')."),
19
- provider_name: z.string().describe("Name of the upstream provider used."),
20
- tokens_prompt: z.number().int().describe("Number of tokens in the prompt."),
18
+ finish_reason: z.string().describe("Normalized finish reason (e.g., 'stop', 'length').").nullable(),
19
+ provider_name: z.string().describe("Name of the upstream provider used.").nullable(),
20
+ tokens_prompt: z.number().int().describe("Number of tokens in the prompt.").nullable(),
21
21
  cache_discount: z.number().describe("Discount applied from cache hits, if any.").nullable().optional(),
22
- generation_time: z.number().int().describe("Time in milliseconds taken by the model to generate the content."),
22
+ generation_time: z.number().int().describe("Time in milliseconds taken by the model to generate the content.").nullable(),
23
23
  num_media_prompt: z.number().int().describe("Number of media items in the prompt.").nullable().optional(),
24
- tokens_completion: z.number().int().describe("Number of tokens in the completion."),
24
+ tokens_completion: z.number().int().describe("Number of tokens in the completion.").nullable(),
25
25
  moderation_latency: z.number().int().describe("Latency in milliseconds spent on moderation, if any.").nullable().optional(),
26
26
  num_search_results: z.number().int().describe("Number of search results used, if any.").nullable().optional(),
27
- native_finish_reason: z.string().describe("Raw finish reason returned by the model."),
28
- native_tokens_prompt: z.number().int().describe("Prompt tokens counted by the provider's tokenizer."),
27
+ native_finish_reason: z.string().describe("Raw finish reason returned by the model.").nullable(),
28
+ native_tokens_prompt: z.number().int().describe("Prompt tokens counted by the provider's tokenizer.").nullable(),
29
29
  num_media_completion: z.number().int().describe("Number of media items in the completion.").nullable().optional(),
30
- native_tokens_reasoning: z.number().int().describe("Tokens used for internal reasoning by the model."),
30
+ native_tokens_reasoning: z.number().int().describe("Tokens used for internal reasoning by the model.").nullable(),
31
31
  upstream_inference_cost: z.number().describe("Cost charged by the upstream provider.").nullable().optional(),
32
- native_tokens_completion: z.number().int().describe("Completion tokens counted by the provider's tokenizer.")
32
+ native_tokens_completion: z.number().int().describe("Completion tokens counted by the provider's tokenizer.").nullable()
33
33
  }).describe("Detailed metadata for a specific generation request.");
34
34
  const openrouterGetGeneration = action("OPENROUTER_GET_GENERATION", {
35
35
  slug: "openrouter-get-generation",
@@ -1 +1 @@
1
- {"version":3,"file":"get-generation.mjs","names":[],"sources":["../../src/actions/get-generation.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetGenerationInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the generation to retrieve.\"),\n}).describe(\"Request model for retrieving a generation by its unique ID.\");\nconst OpenrouterGetGeneration_GenerationDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the generation.\"),\n model: z.string().describe(\"Model used to generate the response.\"),\n usage: z.number().describe(\"Normalized token usage (sum of prompt and completion tokens).\"),\n app_id: z.number().int().describe(\"Application identifier associated with this generation.\").nullable().optional(),\n origin: z.string().describe(\"Source/origin of the request.\"),\n is_byok: z.boolean().describe(\"Indicates if a BYOK key was used.\"),\n latency: z.number().int().describe(\"Total latency in milliseconds for response generation.\"),\n streamed: z.boolean().describe(\"Whether this generation was streamed.\"),\n cancelled: z.boolean().describe(\"Whether this generation was cancelled before completion.\"),\n created_at: z.string().describe(\"Timestamp when the generation was created.\"),\n total_cost: z.number().describe(\"Total cost incurred for this generation.\"),\n upstream_id: z.string().describe(\"Upstream provider's generation ID, if any.\").nullable().optional(),\n finish_reason: z.string().describe(\"Normalized finish reason (e.g., 'stop', 'length').\"),\n provider_name: z.string().describe(\"Name of the upstream provider used.\"),\n tokens_prompt: z.number().int().describe(\"Number of tokens in the prompt.\"),\n cache_discount: z.number().describe(\"Discount applied from cache hits, if any.\").nullable().optional(),\n generation_time: z.number().int().describe(\"Time in milliseconds taken by the model to generate the content.\"),\n num_media_prompt: z.number().int().describe(\"Number of media items in the prompt.\").nullable().optional(),\n tokens_completion: z.number().int().describe(\"Number of tokens in the completion.\"),\n moderation_latency: z.number().int().describe(\"Latency in milliseconds spent on moderation, if any.\").nullable().optional(),\n num_search_results: z.number().int().describe(\"Number of search results used, if any.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Raw finish reason returned by the model.\"),\n native_tokens_prompt: z.number().int().describe(\"Prompt tokens counted by the provider's tokenizer.\"),\n num_media_completion: z.number().int().describe(\"Number of media items in the completion.\").nullable().optional(),\n native_tokens_reasoning: z.number().int().describe(\"Tokens used for internal reasoning by the model.\"),\n upstream_inference_cost: z.number().describe(\"Cost charged by the upstream provider.\").nullable().optional(),\n native_tokens_completion: z.number().int().describe(\"Completion tokens counted by the provider's tokenizer.\"),\n}).describe(\"Detailed metadata for a specific generation request.\");\nexport const OpenrouterGetGenerationOutput: z.ZodTypeAny = z.object({\n data: OpenrouterGetGeneration_GenerationDataSchema.nullable(),\n}).describe(\"Response model containing the data for a retrieved generation.\");\n\nexport const openrouterGetGeneration = action(\"OPENROUTER_GET_GENERATION\", {\n slug: \"openrouter-get-generation\",\n name: \"Get Generation\",\n description: \"Tool to retrieve a generation result by its unique ID. Use after a generation completes to fetch metadata like token counts, cost, and latency.\",\n input: OpenrouterGetGenerationInput,\n output: OpenrouterGetGenerationOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6C,EAAE,OAAO,EACjE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,EAC5E,CAAC,CAAC,CAAC,SAAS,6DAA6D;AACzE,MAAM,+CAA6D,EAAE,OAAO;CAC1E,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CAC9D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACjE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CAC1F,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC3D,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC;CACjE,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD;CAC3F,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;CACtE,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,0DAA0D;CAC1F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CAC5E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAC1E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CACvF,eAAe,EA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a;CACb,OAAO;CACP,QATyD,EAAE,OAAO,EAClE,MAAM,6CAA6C,SAAS,EAC9D,CAAC,CAAC,CAAC,SAAS,gEAOF;AACV,CAAC"}
1
+ {"version":3,"file":"get-generation.mjs","names":[],"sources":["../../src/actions/get-generation.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetGenerationInput = z.object({\n id: z.string().describe(\"Unique identifier of the generation to retrieve.\"),\n}).describe(\"Request model for retrieving a generation by its unique ID.\");\nconst OpenrouterGetGeneration_GenerationDataSchema = z.object({\n id: z.string().describe(\"Unique identifier of the generation.\").nullable(),\n model: z.string().describe(\"Model used to generate the response.\").nullable(),\n usage: z.number().describe(\"Normalized token usage (sum of prompt and completion tokens).\").nullable(),\n app_id: z.number().int().describe(\"Application identifier associated with this generation.\").nullable().optional(),\n origin: z.string().describe(\"Source/origin of the request.\").nullable(),\n is_byok: z.boolean().describe(\"Indicates if a BYOK key was used.\").nullable(),\n latency: z.number().int().describe(\"Total latency in milliseconds for response generation.\").nullable(),\n streamed: z.boolean().describe(\"Whether this generation was streamed.\").nullable(),\n cancelled: z.boolean().describe(\"Whether this generation was cancelled before completion.\").nullable(),\n created_at: z.string().describe(\"Timestamp when the generation was created.\").nullable(),\n total_cost: z.number().describe(\"Total cost incurred for this generation.\").nullable(),\n upstream_id: z.string().describe(\"Upstream provider's generation ID, if any.\").nullable().optional(),\n finish_reason: z.string().describe(\"Normalized finish reason (e.g., 'stop', 'length').\").nullable(),\n provider_name: z.string().describe(\"Name of the upstream provider used.\").nullable(),\n tokens_prompt: z.number().int().describe(\"Number of tokens in the prompt.\").nullable(),\n cache_discount: z.number().describe(\"Discount applied from cache hits, if any.\").nullable().optional(),\n generation_time: z.number().int().describe(\"Time in milliseconds taken by the model to generate the content.\").nullable(),\n num_media_prompt: z.number().int().describe(\"Number of media items in the prompt.\").nullable().optional(),\n tokens_completion: z.number().int().describe(\"Number of tokens in the completion.\").nullable(),\n moderation_latency: z.number().int().describe(\"Latency in milliseconds spent on moderation, if any.\").nullable().optional(),\n num_search_results: z.number().int().describe(\"Number of search results used, if any.\").nullable().optional(),\n native_finish_reason: z.string().describe(\"Raw finish reason returned by the model.\").nullable(),\n native_tokens_prompt: z.number().int().describe(\"Prompt tokens counted by the provider's tokenizer.\").nullable(),\n num_media_completion: z.number().int().describe(\"Number of media items in the completion.\").nullable().optional(),\n native_tokens_reasoning: z.number().int().describe(\"Tokens used for internal reasoning by the model.\").nullable(),\n upstream_inference_cost: z.number().describe(\"Cost charged by the upstream provider.\").nullable().optional(),\n native_tokens_completion: z.number().int().describe(\"Completion tokens counted by the provider's tokenizer.\").nullable(),\n}).describe(\"Detailed metadata for a specific generation request.\");\nexport const OpenrouterGetGenerationOutput = z.object({\n data: OpenrouterGetGeneration_GenerationDataSchema.nullable(),\n}).describe(\"Response model containing the data for a retrieved generation.\");\n\nexport const openrouterGetGeneration = action(\"OPENROUTER_GET_GENERATION\", {\n slug: \"openrouter-get-generation\",\n name: \"Get Generation\",\n description: \"Tool to retrieve a generation result by its unique ID. Use after a generation completes to fetch metadata like token counts, cost, and latency.\",\n input: OpenrouterGetGenerationInput,\n output: OpenrouterGetGenerationOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA+B,EAAE,OAAO,EACnD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,EAC5E,CAAC,CAAC,CAAC,SAAS,6DAA6D;AACzE,MAAM,+CAA+C,EAAE,OAAO;CAC5D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC5E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACrG,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,S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,IAAI,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1H,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5G,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAC/F,sBAAsB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAC/G,sBAAsB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,yBAAyB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAChH,yBAAyB,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,0BAA0B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;AACzH,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAKlE,MAAa,0BAA0B,OAAO,6BAA6B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT2C,EAAE,OAAO,EACpD,MAAM,6CAA6C,SAAS,EAC9D,CAAC,CAAC,CAAC,SAAS,gEAOF;AACV,CAAC"}
@@ -5,7 +5,7 @@ const OpenrouterGetModelsCountInput = zod.z.object({
5
5
  x_title: zod.z.string().describe("The app display name allows you to customize how your app appears in OpenRouter's dashboard.").optional(),
6
6
  http_referer: zod.z.string().describe("The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.").optional()
7
7
  }).describe("Request model for getting the total count of available models.");
8
- const OpenrouterGetModelsCount_ModelsCountDataSchema = zod.z.object({ count: zod.z.number().int().describe("Total number of available models") }).describe("Container for the model count.");
8
+ const OpenrouterGetModelsCount_ModelsCountDataSchema = zod.z.object({ count: zod.z.number().int().describe("Total number of available models").nullable() }).describe("Container for the model count.");
9
9
  const OpenrouterGetModelsCountOutput = zod.z.object({ data: OpenrouterGetModelsCount_ModelsCountDataSchema.nullable() }).describe("Response model containing the total count of available models.");
10
10
  const openrouterGetModelsCount = require_action.action("OPENROUTER_GET_MODELS_COUNT", {
11
11
  slug: "openrouter-get-models-count",
@@ -1 +1 @@
1
- {"version":3,"file":"get-models-count.cjs","names":["z","action"],"sources":["../../src/actions/get-models-count.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetModelsCountInput: z.ZodTypeAny = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request model for getting the total count of available models.\");\nconst OpenrouterGetModelsCount_ModelsCountDataSchema: z.ZodTypeAny = z.object({\n count: z.number().int().describe(\"Total number of available models\"),\n}).describe(\"Container for the model count.\");\nexport const OpenrouterGetModelsCountOutput: z.ZodTypeAny = z.object({\n data: OpenrouterGetModelsCount_ModelsCountDataSchema.nullable(),\n}).describe(\"Response model containing the total count of available models.\");\n\nexport const openrouterGetModelsCount = action(\"OPENROUTER_GET_MODELS_COUNT\", {\n slug: \"openrouter-get-models-count\",\n name: \"Get Models Count\",\n description: \"Tool to get the total count of available models on OpenRouter. Use when you need to know how many models are available without fetching the full list.\",\n input: OpenrouterGetModelsCountInput,\n output: OpenrouterGetModelsCountOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8CA,IAAAA,EAAE,OAAO;CAClE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACtI,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACjM,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAM,iDAA+DA,IAAAA,EAAE,OAAO,EAC5E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,EACrE,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAC5C,MAAa,iCAA+CA,IAAAA,EAAE,OAAO,EACnE,MAAM,+CAA+C,SAAS,EAChE,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAE5E,MAAa,2BAA2BC,eAAAA,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"get-models-count.cjs","names":["z","action"],"sources":["../../src/actions/get-models-count.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetModelsCountInput = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request model for getting the total count of available models.\");\nconst OpenrouterGetModelsCount_ModelsCountDataSchema = z.object({\n count: z.number().int().describe(\"Total number of available models\").nullable(),\n}).describe(\"Container for the model count.\");\nexport const OpenrouterGetModelsCountOutput = z.object({\n data: OpenrouterGetModelsCount_ModelsCountDataSchema.nullable(),\n}).describe(\"Response model containing the total count of available models.\");\n\nexport const openrouterGetModelsCount = action(\"OPENROUTER_GET_MODELS_COUNT\", {\n slug: \"openrouter-get-models-count\",\n name: \"Get Models Count\",\n description: \"Tool to get the total count of available models on OpenRouter. Use when you need to know how many models are available without fetching the full list.\",\n input: OpenrouterGetModelsCountInput,\n output: OpenrouterGetModelsCountOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACtI,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACjM,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAM,iDAAiDA,IAAAA,EAAE,OAAO,EAC9D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,EAChF,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAC5C,MAAa,iCAAiCA,IAAAA,EAAE,OAAO,EACrD,MAAM,+CAA+C,SAAS,EAChE,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAE5E,MAAa,2BAA2BC,eAAAA,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,19 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-models-count.d.ts
4
- declare const OpenrouterGetModelsCountInput: z.ZodTypeAny;
5
- declare const OpenrouterGetModelsCountOutput: z.ZodTypeAny;
6
- declare const openrouterGetModelsCount: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const OpenrouterGetModelsCountInput: z.ZodObject<{
5
+ x_title: z.ZodOptional<z.ZodString>;
6
+ http_referer: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ declare const OpenrouterGetModelsCountOutput: z.ZodObject<{
9
+ data: z.ZodNullable<z.ZodObject<{
10
+ count: z.ZodNullable<z.ZodNumber>;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>;
13
+ declare const openrouterGetModelsCount: import("@keystrokehq/action").WorkflowActionDefinition<{
14
+ x_title?: string | undefined;
15
+ http_referer?: string | undefined;
16
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
17
  //#endregion
8
18
  export { openrouterGetModelsCount };
9
19
  //# sourceMappingURL=get-models-count.d.cts.map