@jacobbd/relay-ai 0.12.5 → 0.12.6

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.
@@ -10,7 +10,7 @@ import {
10
10
  supportsManualModels,
11
11
  translateRequest,
12
12
  validateCustomEndpointUrl
13
- } from "./chunk-2LUDFIZX.js";
13
+ } from "./chunk-VPDX24ZR.js";
14
14
 
15
15
  // src/registry/validate-manual-model.ts
16
16
  import { randomUUID } from "crypto";
@@ -149,4 +149,4 @@ export {
149
149
  addManualModel,
150
150
  removeManualModel
151
151
  };
152
- //# sourceMappingURL=chunk-SJEJAHKL.js.map
152
+ //# sourceMappingURL=chunk-6ULON7FU.js.map
@@ -7,7 +7,7 @@ import { join } from "path";
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "@jacobbd/relay-ai",
10
- version: "0.12.5",
10
+ version: "0.12.6",
11
11
  publishConfig: {
12
12
  access: "public"
13
13
  },
@@ -694,6 +694,13 @@ function decodeAuthEntry(value) {
694
694
  if (typeof value === "string" && value.trim()) return value.trim();
695
695
  if (!value || typeof value !== "object") return null;
696
696
  const record = value;
697
+ if (record["type"] === "api" && typeof record["key"] === "string" && record["key"].trim()) {
698
+ return {
699
+ type: "api",
700
+ key: record["key"],
701
+ metadata: record["metadata"] && typeof record["metadata"] === "object" && !Array.isArray(record["metadata"]) ? record["metadata"] : void 0
702
+ };
703
+ }
697
704
  if (record["type"] === "oauth" && typeof record["access"] === "string" && typeof record["refresh"] === "string" && typeof record["expires"] === "number") {
698
705
  return {
699
706
  type: "oauth",
@@ -747,6 +754,9 @@ function readOpencodeAuthFile(env = process.env) {
747
754
  function isOpencodeOAuth(entry) {
748
755
  return !!entry && typeof entry === "object" && entry.type === "oauth";
749
756
  }
757
+ function isOpencodeApi(entry) {
758
+ return !!entry && typeof entry === "object" && entry.type === "api";
759
+ }
750
760
  function oauthCredentialToKeychainJson(cred) {
751
761
  return JSON.stringify(cred);
752
762
  }
@@ -5190,6 +5200,7 @@ export {
5190
5200
  routeLookupIds,
5191
5201
  readOpencodeAuthFile,
5192
5202
  isOpencodeOAuth,
5203
+ isOpencodeApi,
5193
5204
  oauthCredentialToKeychainJson,
5194
5205
  tokensToStoredCredential,
5195
5206
  supportsNativeOAuth,
@@ -5263,4 +5274,4 @@ export {
5263
5274
  streamAnthropicResponse,
5264
5275
  generateAnthropicResponse
5265
5276
  };
5266
- //# sourceMappingURL=chunk-2LUDFIZX.js.map
5277
+ //# sourceMappingURL=chunk-VPDX24ZR.js.map