mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-21 00:21:30 +00:00
* feat(embeddings): support GITNEXUS_EMBEDDING_REQUEST_DIMS=omit What: Honor GITNEXUS_EMBEDDING_REQUEST_DIMS=omit by suppressing the request-body `dimensions` field sent to HTTP embedding backends. Why: Strict OpenAI-compatible backends return vectors in the model's native size but reject an unfamiliar `dimensions` field, breaking `analyze --embeddings` against them. The var was parsed but never propagated, so `omit` was a no-op. How: Add `requestDimensions` to HttpConfig, return it from readConfig, and forward `config.requestDimensions` (not the validation-only `config.dimensions`) to `httpEmbedBatch`. Local dimension checks still use `config.dimensions`. Details: Coexists with the retry/pacing fields introduced upstream; both feature sets are preserved. Default behavior unchanged when REQUEST_DIMS is unset. Impact: gitnexus/src/core/embeddings/http-client.ts; README; unit tests. * fix(embeddings): name GITNEXUS_EMBEDDING_REQUEST_DIMS in its own config error Address the review findings on #2574. What: - A malformed GITNEXUS_EMBEDDING_REQUEST_DIMS now throws an error naming GITNEXUS_EMBEDDING_REQUEST_DIMS, not the sibling GITNEXUS_EMBEDDING_DIMS. - isHttpEmbeddingDimsError recognizes both leads, so the CLI still classifies the REQUEST_DIMS config mistake as a clean config error, not a stack dump. - Tests: numeric-override decoupling (DIMS=1024 validates the response while REQUEST_DIMS=512 is sent in the body), the omit aliases (none/off/false/0), and the malformed-value error path (which also pins the naming fix). - README documents the full accepted values: omit-aliases and integer override. Why: readConfig reused the DIMS error lead for the REQUEST_DIMS branch, so REQUEST_DIMS=garbage misdirected the operator to edit the wrong variable. The feature's actual decoupling and its non-omit inputs had no test coverage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: wangxc <wangxc_a_bj@si-tech.com.cn> Co-authored-by: Gergő Magyar <gergomagyar@icloud.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||