Skip to content

Refactor: add explicit ParameterSpec for embedding components#10853

Open
ManishSharma1609 wants to merge 6 commits into
spiceai:trunkfrom
ManishSharma1609:refactor/embedding-params-handling
Open

Refactor: add explicit ParameterSpec for embedding components#10853
ManishSharma1609 wants to merge 6 commits into
spiceai:trunkfrom
ManishSharma1609:refactor/embedding-params-handling

Conversation

@ManishSharma1609
Copy link
Copy Markdown

@ManishSharma1609 ManishSharma1609 commented May 15, 2026

  • Create crates/runtime/src/embeddings/params/ with per-provider ParameterSpec definitions for all 8 embedding providers (openai, azure, google, huggingface, databricks, bedrock, file, model2vec)
  • Update try_to_embedding to use Parameters::try_new with explicit specs
  • Update all provider function signatures from HashMap to Parameters
  • Remove unused extract_secret macro from embed.rs

Closes #6755

Summary

Replicates the approach from #6199 for embedding components. Adds explicit ParameterSpec definitions for all 8 embedding providers instead of the free-form HashMap, and wires them through Parameters::try_new in try_to_embedding.

Related

Closes #6755

Breaking Changes

None, existing embedding configurations continue to work. Unknown parameters will now emit a warning log instead of being silently ignored.

Docs

No doc changes required.

Notes for Reviewers

Tests added for all 8 embedding provider ParameterSpec definitions.
Followed the same pattern used in #6199 for model components.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@ManishSharma1609 ManishSharma1609 requested a review from a team as a code owner May 15, 2026 05:06
@ManishSharma1609 ManishSharma1609 changed the title refactor: add explicit ParameterSpec for embedding components [WIP] refactor: add explicit ParameterSpec for embedding components May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

✅ Pull with Spice Passed

Passing checks:

  • ✅ Title meets minimum length requirement (10 characters)
  • ✅ No banned labels detected
  • ✅ Has a label from required category kind/
  • ✅ Has a label from required category area/
  • ✅ Has at least one assignee: Jeadie, ManishSharma1609

@ManishSharma1609 ManishSharma1609 force-pushed the refactor/embedding-params-handling branch from 9583532 to 549360d Compare May 15, 2026 05:31
@Jeadie Jeadie added the area/ai label May 16, 2026
@ManishSharma1609 ManishSharma1609 force-pushed the refactor/embedding-params-handling branch 3 times, most recently from adda819 to cf60911 Compare May 17, 2026 12:35
@ManishSharma1609 ManishSharma1609 changed the title [WIP] refactor: add explicit ParameterSpec for embedding components Refactor: add explicit ParameterSpec for embedding components May 19, 2026
- Create crates/runtime/src/embeddings/params/ with per-provider
  ParameterSpec definitions for all 8 embedding providers
  (openai, azure, google, huggingface, databricks, bedrock, file, model2vec)
- Update try_to_embedding to use Parameters::try_new with explicit specs
- Update all provider function signatures from HashMap to Parameters
- Remove unused extract_secret macro from embed.rs

Closes spiceai#6755
@ManishSharma1609 ManishSharma1609 force-pushed the refactor/embedding-params-handling branch from 5528b24 to 0f91de8 Compare May 19, 2026 04:59
@claudespice
Copy link
Copy Markdown
Collaborator

@copilot review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor params handling in embedding components

3 participants