oh-my-opencode-kikokikok 2.15.7 → 2.15.8

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/dist/cli/index.js CHANGED
@@ -2253,7 +2253,7 @@ var require_picocolors = __commonJS((exports, module) => {
2253
2253
  var require_package = __commonJS((exports, module) => {
2254
2254
  module.exports = {
2255
2255
  name: "oh-my-opencode-kikokikok",
2256
- version: "2.15.7",
2256
+ version: "2.15.8",
2257
2257
  description: "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
2258
2258
  main: "dist/index.js",
2259
2259
  types: "dist/index.d.ts",
@@ -7,6 +7,7 @@ export declare class LettaAdapter {
7
7
  private modelDetectionPromise;
8
8
  constructor(config: LettaConfig);
9
9
  private detectEmbeddingModel;
10
+ private normalizeModelHandle;
10
11
  add(input: AddMemoryInput): Promise<Memory>;
11
12
  search(input: SearchMemoryInput): Promise<MemorySearchResult[]>;
12
13
  get(id: string): Promise<Memory | null>;
package/dist/index.js CHANGED
@@ -43796,7 +43796,7 @@ class LettaAdapter {
43796
43796
  }
43797
43797
  async detectEmbeddingModel() {
43798
43798
  if (this.config.embeddingModel) {
43799
- return this.config.embeddingModel;
43799
+ return this.normalizeModelHandle(this.config.embeddingModel);
43800
43800
  }
43801
43801
  if (this.detectedEmbeddingModel) {
43802
43802
  return this.detectedEmbeddingModel;
@@ -43821,13 +43821,19 @@ class LettaAdapter {
43821
43821
  const preferredName = this.config.preferredEmbeddingModel ?? "text-embedding-3-small";
43822
43822
  const preferred = proxyEmbeddingModels.find((m) => m.name.includes(preferredName));
43823
43823
  const model = preferred ?? proxyEmbeddingModels[0];
43824
- this.detectedEmbeddingModel = `openai/${model.name}`;
43824
+ this.detectedEmbeddingModel = model.handle;
43825
43825
  }
43826
43826
  } catch {}
43827
43827
  })();
43828
43828
  await this.modelDetectionPromise;
43829
43829
  return this.detectedEmbeddingModel ?? DEFAULT_EMBEDDING_MODEL;
43830
43830
  }
43831
+ normalizeModelHandle(model) {
43832
+ if (model.startsWith("openai/") && !model.startsWith("openai-proxy/")) {
43833
+ return model.replace("openai/", "openai-proxy/");
43834
+ }
43835
+ return model;
43836
+ }
43831
43837
  async add(input) {
43832
43838
  if (!this.config.enabled) {
43833
43839
  throw new Error("Letta is not enabled");
@@ -44010,12 +44016,13 @@ class LettaAdapter {
44010
44016
  return existing;
44011
44017
  }
44012
44018
  const embeddingModel = await this.detectEmbeddingModel();
44019
+ const llmModel = this.normalizeModelHandle(this.config.llmModel ?? DEFAULT_LLM_MODEL);
44013
44020
  const agentName = this.getAgentName(layer);
44014
44021
  const response2 = await this.request("/v1/agents", {
44015
44022
  method: "POST",
44016
44023
  body: JSON.stringify({
44017
44024
  name: agentName,
44018
- model: this.config.llmModel ?? DEFAULT_LLM_MODEL,
44025
+ model: llmModel,
44019
44026
  embedding: embeddingModel,
44020
44027
  memory_blocks: [
44021
44028
  { label: "persona", value: `OpenCode memory agent for ${layer} layer` },
@@ -44049,12 +44056,13 @@ class LettaAdapter {
44049
44056
  await this.request(`/v1/agents/${existingAgent.id}`, { method: "DELETE" }).catch(() => {});
44050
44057
  this.agentCache.delete(layer);
44051
44058
  const embeddingModel = await this.detectEmbeddingModel();
44059
+ const llmModel = this.normalizeModelHandle(this.config.llmModel ?? DEFAULT_LLM_MODEL);
44052
44060
  const agentName = this.getAgentName(layer);
44053
44061
  const response2 = await this.request("/v1/agents", {
44054
44062
  method: "POST",
44055
44063
  body: JSON.stringify({
44056
44064
  name: agentName,
44057
- model: this.config.llmModel ?? DEFAULT_LLM_MODEL,
44065
+ model: llmModel,
44058
44066
  embedding: embeddingModel,
44059
44067
  memory_blocks: [
44060
44068
  { label: "persona", value: `OpenCode memory agent for ${layer} layer` },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-kikokikok",
3
- "version": "2.15.7",
3
+ "version": "2.15.8",
4
4
  "description": "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",