Skip to content

[OMEGA-491] Allow to setting an embedding provider via the launcher - #387

Merged
paul-v-snet merged 3 commits into
patch-to-v0.1.20from
omega-491-asicloud-embedding-provider-fix
Oct 12, 2026
Merged

paul-v-snet merged 3 commits into
patch-to-v0.1.20from
omega-491-asicloud-embedding-provider-fix

Conversation

@paul-v-snet

Copy link
Copy Markdown
Collaborator

Description

Introduces a new -e parameter to start launcher command which allows to set an embedding provider when starting Omega.
The default embedding provider Local for the ASICloud provider was kept as before to ensure this won't break existing users vector stores after the update.

The parameter accepts only Local, OpenAI, and ASICloud; these are the complete set of currently supported embedding providers. The parameter is also case-sensitive since the value is compared with Local in src/memory.metta, and using local could lead to crashes:

(if (== (embeddingprovider) Local)

The final embedding provider is selected in the following order:

  1. -e <provider>
  2. EMBEDDING_PROVIDER if -e is not passed
  3. The default provider (Local for ASICloud) if neither of the above is provided

How Has This Been Tested?

  • Ran via start with the -e parameter and different providers: all passed
  • Ran mock tests: all green

Checklist

  • PR contains autogenerated code
  • Self-review completed
  • Test scenarios above are passed with the version of the code from PR

@timur-ashkenov timur-ashkenov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paul-v-snet And if you choose different providers for the LLM and embeddings—for example, -p Anthropic -e OpenAI—how does the OpenAI key get into the container? Right now, it seems only the LLM provider's key is passed through. Is a separate key required for embeddings?

@paul-v-snet

Copy link
Copy Markdown
Collaborator Author

@timur-ashkenov, right, my bad, thanks for catching that. I'll fix it.

@TossSky TossSky closed this Oct 9, 2026
@TossSky TossSky reopened this Oct 9, 2026
@paul-v-snet

Copy link
Copy Markdown
Collaborator Author

@timur-ashkenov, fixed in ca3d3b5

@TossSky

TossSky commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Tested: ca3d3b5 against patch-to-v0.1.20, image singularitynet/omega:v0.1.20, with scripts/omega start and the interactive bootstrap. The agent ran with ASICloud, Anthropic and Test as the LLM provider and with Local, ASICloud and OpenAI embeddings, on IRC and websocket.

What I checked

  • test_memory_chromadb, test_memory_episode, test_memory_history and test_skill_query pass with start -p ASICloud -e ASICloud. The agent runs with embeddingprovider=ASICloud, and its embedding requests go to /asicloud/embeddings. Without -e, ASICloud stays on Local.
  • -eASICloud and EMBEDDING_PROVIDER=ASICloud select ASICloud embeddings too, and -e wins when both are set. -e ASICloud also works when the script is piped into bash -s -- start.
  • The agent stores a fact and recalls it with -p Anthropic -e ASICloud and -p ASICloud -e OpenAI, and knowledge import on start completes with -e ASICloud. Without the embedding key, start exits with code 1 and "ASI_API_KEY is not set (required by embedding provider ASICloud)" (or the OpenAI variant) before any docker call.
  • -e Foo, -e asicloud and -e without a value exit with code 1. A running omega container keeps its id and start time after -e Foo and after a missing embedding key.
  • Without -e, the arguments for ASICloud, OpenAI, ASIOne, OpenRouter, OpenAIAPI and Test are the same as on patch-to-v0.1.20.
  • Export and import move a memory between Local and ASICloud embeddings in both directions, with the vectors computed again for the new provider. An ASICloud export imported with ASICloud keeps its vectors.

stop and clean fail on a lowercase EMBEDDING_PROVIDER

options() checks the variable for every command. With EMBEDDING_PROVIDER=openai in the environment, stop and clean exit with code 1 and "Unsupported embedding provider: openai, use Local, OpenAI or ASICloud" without calling docker, and --version prints the same error. On patch-to-v0.1.20 they work, and import_knowledge.sh, which the README tells users to run with this variable, accepts lowercase values.

Changing the embedding provider of an existing memory gives no warning

This happens with -e and also with EMBEDDING_PROVIDER, which the README asks users to export for the knowledge import. Local and ASICloud embeddings both have 1024 dimensions but come from different models, so no error appears and the search ranking becomes random. A memory of 20 facts built with Local and restarted with -e ASICloud returned the right fact first for 0 of 20 questions. The same memory exported and imported into an instance with -e ASICloud returned it first for 20 of 20. With OpenAI embeddings on such a memory, remember and query fail with InvalidArgumentError, and the agent still reports that the fact was saved. That OpenAI case is not new: on patch-to-v0.1.20, -p OpenAI already selects OpenAI embeddings.

The bootstrap wizard does not offer the embedding provider

With ASICloud picked in the wizard of ./scripts/omega <image>, docker run gets embeddingprovider=Local. The bootstrap ignores -e ASICloud and EMBEDDING_PROVIDER=ASICloud, because the wizard's config overwrites them. Only start can use ASICloud embeddings.

None of this blocks the change. The stop and clean failure can be fixed in this PR.

Verdict: PASS
@paul-v-snet @timur-ashkenov

@paul-v-snet
paul-v-snet merged commit 85461f5 into patch-to-v0.1.20 Oct 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants