[Bug] PooledService.Embed with empty request.Requests makes zero upstream RPCs yet calls MarkAuthenticationValid and MarkModelAccessVerified
发生了什么 / What happened
Summary
In internal/aistudio/build_embed.go:146-158 and 219-231, Client.embed loops for start := 0; start < len(request.Requests); start += buildEmbedBatchLimit. When len(request.Requests) == 0, it returns EmbeddingResult{}, nil with zero upstream RPCs, and PooledService.Embed proceeds to call lease.MarkAuthenticationValid() and s.pool.MarkModelAccessVerifiedIfGeneration(...).
Suggested Fix
Reject empty request.Requests with ErrInvalidArgument at the start of PooledService.Embed / Client.embed.
版本 / Version
v0.3.14
每人最多同时打开 3 个 Issue,这个 Issue 已自动关闭。请等已有的 Issue 处理完再提,或把内容补充到已有的 Issue 里。
Each user can have at most 3 open issues at a time, so this one was closed automatically. Please wait until your existing issues are resolved, or add this to one of them.