Skip to content

Update onyx usage docs.#1529

Merged
jasperblues merged 1 commit intomainfrom
feature/onyx-docs-clarity
Mar 27, 2026
Merged

Update onyx usage docs.#1529
jasperblues merged 1 commit intomainfrom
feature/onyx-docs-clarity

Conversation

@jasperblues
Copy link
Copy Markdown
Contributor

Summary

  • Document @DependsOn requirement when directly injecting model beans (EmbeddingService, LlmService) registered via registerSingleton
  • Update ProviderInitialization KDoc to explain the dynamic registration pattern and its implications for consumers
  • Update RAG reference docs with @DependsOn in the DrivineStore code examples (Java and Kotlin)

Context

Model provider auto-configurations register beans dynamically via ConfigurableBeanFactory.registerSingleton() to support multiple models per provider with configuration-driven names. This is invisible to most consumers since framework beans like ModelProvider handle ordering internally.
However, application code that injects EmbeddingService or LlmService directly (e.g. wiring a custom DrivineStore) will get a NoSuchBeanDefinitionException without @DependsOn, because Spring resolves the dependency before the initializer's factory method has run.

Discovered while integrating the ONNX embedding module in embabel/guide.

Changes

File Change
embabel-agent-common/embabel-agent-ai/.../ProviderInitialization.kt Expanded KDoc: explains registerSingleton pattern, when @DependsOn is needed, and why
embabel-agent-docs/.../reference/rag/page.adoc Added @DependsOn("onnxEmbeddingInitializer") to Java and Kotlin examples; added NOTE explaining the requirement

@sonarqubecloud
Copy link
Copy Markdown

@jasperblues jasperblues merged commit 993c59d into main Mar 27, 2026
16 of 17 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.

2 participants