mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 10:15:43 +00:00
issue: #50229 ## What this PR does Adds configurable request timeouts for external function model providers (embedding / rerank / highlight), and standardizes the timeout unit from **seconds → milliseconds** across all providers and clients. ### Changes - New global config `function.model.timeout_ms` (default `30000`, refreshable, exported to `milvus.yaml`). - New per-function param `timeout_ms` which **overrides** the global setting (`models.ResolveTimeoutMs`). Invalid / non-positive values fall back to the `30000` default. - Converted every provider/client timeout argument from `timeoutSec` to `timeoutMs`; `PostRequest` now applies the value as milliseconds. - Zilliz gRPC client now applies a per-request deadline via `requestContext` (previously had no request timeout). - Bedrock embedding now derives its call context from the request `ctx` with the configured timeout (was `context.Background()`). ## Tests - `models`: `TestParseTimeoutMs` (defaults, override, invalid, zero/negative, case-insensitive key), `TestResolveTimeoutMs` (global default + per-function override), and `TestZillizClient_RequestContext` (per-request deadline + metadata). - `rerank`: provider param validation for invalid / non-positive `timeout_ms`. - `paramtable`: `TestFunctionConfig` asserts the new default. - Updated zilliz client / rerank / embedding / highlight tests for the ms unit and the new test constructor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>