gitdataai/libs/service/agent
ZhenYi a8e3b0f5a8 fix(agent/sync): handle multiple /v1/models response formats
The upstream AI endpoint returns an OpenAI-compatible format, but the
response body parsing was fragile. Make it resilient:
1. Try standard OpenAI format: { "data": [{id}, ...] }
2. Try raw array: [{id}, ...]
3. Try alternate format: { "models": [{id}, ...] }
4. Log actual response body (first 500 chars) when all formats fail

Also adds a warning log with the raw response on parse failure so
future debugging is straightforward.
2026-04-26 16:26:57 +08:00
..
billing.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
code_review.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
issue_triage.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
mod.rs fix(agent/service): retry jitter, tool executor ordering, curl SSRF, grep/JSON 2026-04-25 09:53:31 +08:00
model_capability.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
model_parameter_profile.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
model_pricing.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
model_version.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
model.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
pr_summary.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
provider.rs refactor(service): clean up agent modules, use agent crate types 2026-04-25 20:09:45 +08:00
sync.rs fix(agent/sync): handle multiple /v1/models response formats 2026-04-26 16:26:57 +08:00