gitdataai/libs/service/agent
ZhenYi ecf9f33b26
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
refactor(agent/sync): remove OpenRouter dependency, use upstream /v1/models directly
The upstream AI endpoint already returns complete model metadata:
- name, owned_by, context_length, max_output_tokens
- capabilities (vision, tool_call, reasoning)
- pricing (input, output, cache_read, cache_write, currency)

Remove the OpenRouter fallback entirely and parse the upstream
response directly for all sync operations. Both sync_upstream_models
(API) and sync_once (background task) now use a single unified path.

Changes:
- Remove OpenRouter types and fetch_openrouter_models()
- Add UpstreamModel / UpstreamCapabilities / UpstreamPricing types
- Parse capabilities from upstream instead of inferring from name
- Use real pricing from upstream instead of defaulting to 0.00
- Simplify sync flow: list → parse → upsert (no filtering/matching)
- Add provider normalizations for moonshot, zai, minimax, qwen
2026-04-26 16:30:41 +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 refactor(agent/sync): remove OpenRouter dependency, use upstream /v1/models directly 2026-04-26 16:30:41 +08:00