Raised by @danolivo during review of #14.
Two related observations on the provider abstraction (src/provider.c, EmbeddingProvider):
generate is just generate_batch with count=1. Every provider's single-item generate is a thin wrapper around generate_batch (e.g. gemini_generate in src/provider_gemini.c is a 13-line wrapper). The interface could be collapsed to a single batch method, with the single-item case handled generically.
- Struct extensibility. The
EmbeddingProvider struct is a fixed vtable. If it is not meant to evolve, the surrounding API machinery may be heavier than needed; if it is, it should be designed for extension. Worth a deliberate decision either way.
Action: evaluate simplifying the provider interface to a single batch entry point and decide on the intended extensibility model.
Pre-existing design; not introduced by #14.
Raised by @danolivo during review of #14.
Two related observations on the provider abstraction (
src/provider.c,EmbeddingProvider):generateis justgenerate_batchwith count=1. Every provider's single-itemgenerateis a thin wrapper aroundgenerate_batch(e.g.gemini_generateinsrc/provider_gemini.cis a 13-line wrapper). The interface could be collapsed to a single batch method, with the single-item case handled generically.EmbeddingProviderstruct is a fixed vtable. If it is not meant to evolve, the surrounding API machinery may be heavier than needed; if it is, it should be designed for extension. Worth a deliberate decision either way.Action: evaluate simplifying the provider interface to a single batch entry point and decide on the intended extensibility model.
Pre-existing design; not introduced by #14.