orynacode-ai 1.16.12 → 1.16.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.16.12",
3
+ "version": "1.16.13",
4
4
  "name": "orynacode-ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -7,6 +7,7 @@ import { NoSuchModelError, type Provider as SDK } from "ai"
7
7
  import { Log } from "@opencode-ai/core/util/log"
8
8
  import { Npm } from "@opencode-ai/core/npm"
9
9
  import { Hash } from "@opencode-ai/core/util/hash"
10
+ import { getOrynaGateId } from "../oryna/agent"
10
11
  import { Plugin } from "../plugin"
11
12
  import { serviceUse } from "@opencode-ai/core/effect/service-use"
12
13
  import { type LanguageModelV3 } from "@ai-sdk/provider"
@@ -1687,9 +1688,9 @@ export const layer = Layer.effect(
1687
1688
  if (baseURL !== undefined) options["baseURL"] = baseURL
1688
1689
  if (options["apiKey"] === undefined && provider.key) options["apiKey"] = provider.key
1689
1690
  if (model.providerID === "orynagate") {
1690
- const workspace = path.basename(process.env.ORYNA_GATE_WORKSPACE || process.cwd())
1691
+ const id = getOrynaGateId(process.cwd())
1691
1692
  const user = os.userInfo().username || "user"
1692
- options["apiKey"] = `sk-local-${user}-${workspace}`
1693
+ options["apiKey"] = `sk-local-${user}-${id}`
1693
1694
  }
1694
1695
  if (model.headers)
1695
1696
  options["headers"] = {
@@ -1834,7 +1835,7 @@ export const layer = Layer.effect(
1834
1835
  const s = yield* InstanceState.get(state)
1835
1836
  const envs = yield* env.all()
1836
1837
  const key = `${model.providerID}/${model.id}`
1837
- if (s.models.has(key)) return s.models.get(key)!
1838
+ if (s.models.has(key) && model.providerID !== "orynagate") return s.models.get(key)!
1838
1839
 
1839
1840
  const provider = s.providers[model.providerID]
1840
1841
  return yield* EffectPromise.refineRejection(