ReMe/reme/components
BeiMu-new 5e70ec0476 fix(embedding): classify every provider status shape and split only input errors
The per-item fallback still multiplied service failures into one request per item.
Both gaps come from the fallback this PR adds, so they are fixed here.

Status extraction
- `_http_status()` reads the status from `status_code`, an integer `code` (Google GenAI
  exposes the HTTP status there), `response.status_code` (httpx-style wrappers), and the
  structured `status_code` embedded in the message (AgentScope's DashScope embedding turns
  every non-200 response into a plain `RuntimeError`).
- Only integers are read from `code`. A string `code` names an error
  (`insufficient_quota`, `rate_limit_exceeded`, `InvalidApiKey`); reading it as a status
  would misclassify quota and rate-limit errors.
- `_is_provider_wide_failure`, `_is_transient_provider_failure`, `_is_rate_limited` and
  `_is_input_dependent_failure` all classify through it.

Splitting
- The generic fallback splits only when `_is_input_dependent_failure()` matches: a
  context-length rejection, the one error a single over-long item explains by itself.
  Anything unrecognized is provider-wide and is never answered with one request per item.
- This narrows the isolation this PR adds. An input-dependent error that carries neither a
  status nor an input-length signal is no longer split, so it costs its batch instead of
  multiplying the requests. Erring towards the batch keeps one provider failure from
  becoming N failures and losing the healthy vectors anyway.
- `_embed_individually()` drops the redundant `len(single) == 1` check: the
  `_call_with_retry([text])` contract only returns a result of the expected length.

Verified against the real exception classes: `google.genai.errors.APIError.code` is an
`int`, and a real DashScope response yields a `RuntimeError` whose message carries
`"status_code"`. Regression coverage uses the real classes when available and mirrors
their shape otherwise.
2026-10-16 21:10:39 +08:00
..
agent_wrapper fix(codex): retain tool constraints until threads unload (#630) 2026-10-16 16:46:02 +08:00
as_classifier feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
as_embedding fix(embedding): exclude provider init from health timeout (#484) 2026-08-21 11:23:14 +08:00
as_llm feat(docker): add container deployment and multi-platform release workflow (#582) 2026-10-03 23:54:58 +08:00
client feat(service): support explicit wildcard network binds (#547) 2026-09-15 14:26:33 +08:00
embedding_store fix(embedding): classify every provider status shape and split only input errors 2026-10-16 21:10:39 +08:00
file_catalog feat(core): support live component replacement (#505) 2026-08-28 16:04:02 +08:00
file_chunker fix(chunker): restore malformed JSON text fallback (#557) 2026-10-14 14:43:27 +08:00
file_graph feat(auto_resource): interpret image resources into daily notes (#500) 2026-09-07 12:00:38 +08:00
file_store fix(embedding): keep one bad item from dropping its whole batch 2026-10-16 21:10:38 +08:00
job feat(jobs): add a unified enabled switch for all job types (#580) 2026-09-30 18:30:36 +08:00
keyword_index perf(bm25): maintain live document length incrementally (#590) 2026-10-03 22:38:11 +08:00
outbound_proxy feat: add Auto Fin cookbook and managed outbound proxy support (#392) 2026-07-25 18:09:39 +08:00
service feat(jobs): add a unified enabled switch for all job types (#580) 2026-09-30 18:30:36 +08:00
tag_index feat: auto-tag plugin-generated reports (#534) 2026-09-11 11:52:52 +08:00
tokenizer Refactor logging levels and add dream schema definitions (#291) 2026-06-24 16:44:03 +08:00
__init__.py feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
application_context.py feat: add entry-point plugin system and extract Auto Fin (#459) 2026-08-19 17:23:23 +08:00
base_component.py feat(core): support live component replacement (#505) 2026-08-28 16:04:02 +08:00
component_registry.py feat: add entry-point plugin system and extract Auto Fin (#459) 2026-08-19 17:23:23 +08:00
prompt_handler.py fix(prompt): default omitted conditional flags to false (#424) 2026-08-06 16:22:59 +08:00
runtime_context.py feat: add workspace web APIs and star growth report (#416) 2026-08-05 18:03:37 +08:00