Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
qin-ptr
left a comment
There was a problem hiding this comment.
Review Summary
This PR reverts PR #642 which fixed issue #616 (embedding inputs exceeding token limits causing 400 errors). However, the PR description does not explain why this revert is necessary.
Critical Issues
1. [Design] (blocking) — Missing revert rationale
The PR body only states "Revert" without explaining:
- Why is this revert needed?
- What problem was discovered in the original implementation?
- Is there an issue or user feedback documenting the problem?
- What is the alternative solution?
2. [Bug] (blocking) — Known bug will regress
Issue #616 reported a real, reproducible bug where importing large repositories causes "This model's maximum context length is 8192 tokens, however you requested 13327 tokens" errors, breaking semantic artifact generation.
After this revert, users will encounter this bug again. The original fix (PR #642) was well-designed with proper chunking, token estimation, and weighted averaging.
3. [Design] (blocking) — Configuration breaking change
The max_tokens field removal breaks existing configurations. Since EmbeddingModelConfig uses extra="forbid", any user with embedding.dense.max_tokens in their ov.conf will experience configuration loading failures.
4. [Design] (blocking) — Missing related issue
This revert PR should be linked to an issue documenting:
- What problem was found in PR #642
- Reproduction steps
- Impact analysis
- Proposed alternative
Recommendations
Before merging:
- Add detailed rationale to PR description
- Create and link an issue documenting the discovered problem
- Provide mitigation for issue #616 regression
- Document the breaking change and provide migration guidance
- Consider fixing the specific problem instead of reverting the entire feature
🤖 I am a bot owned by @qin-ctx.
| **({"query_param": cfg.query_param} if cfg.query_param else {}), | ||
| **({"document_param": cfg.document_param} if cfg.document_param else {}), | ||
| "max_tokens": cfg.max_tokens, | ||
| **({"extra_headers": cfg.extra_headers} if cfg.extra_headers else {}), |
There was a problem hiding this comment.
[Design] (blocking)
The removal of "max_tokens": cfg.max_tokens from the factory parameters creates a configuration compatibility issue.
Users who previously configured embedding.dense.max_tokens in their ov.conf will find:
- The config field still exists in their file
- Due to
extra="forbid"inEmbeddingModelConfig, loading will fail with validation error - No migration path or deprecation warning is provided
Recommendation: If this revert is necessary, document it as a breaking change and provide clear migration instructions in release notes.
| @@ -1,532 +0,0 @@ | |||
| # Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd. | |||
There was a problem hiding this comment.
[Suggestion] (non-blocking)
Deleting the entire test file (532 lines) reduces test coverage for the embedder module. Even if the chunking feature is removed, some tests remain valuable:
- Basic embedding functionality
- Batch embedding
- Dimension detection
- Error handling
Consider preserving the core embedder tests even after reverting the chunking feature.
Revert "fix(embed): add text chunking for oversized embedding inputs (#616) (#642)"
This reverts commit cbf8bef.