litellm/tests/test_litellm/proxy/pass_through_endpoints
Ishaan Jaff e3756252a8
Development environment setup (#22432)
* feat: add Cursor Cloud Agents as a native pass-through provider

- Add CURSOR to LlmProviders enum
- Add /cursor/{endpoint:path} pass-through route with Basic Auth
- Add /cursor to mapped_pass_through_routes for proper routing
- Create CursorPassthroughLoggingHandler for Logs page visibility
  - Classifies operations (agent:create, agent:list, models:list, etc.)
  - Logs model as cursor/cursor:<operation> for clean Logs display
  - Tracks cost as $0 (subscription-based, no per-request pricing)
- Add Cursor to UI: provider enum, logo, credential fields
- Add provider_create_fields.json entry for LLM Credentials UI
- Add 18 unit tests covering route, auth, logging, and classification

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix: use correct Cursor logo from lobehub, add documentation page

- Replace placeholder Cursor logo with official hexagonal logo from lobehub
- Add docs/pass_through/cursor.md with full tutorial matching a2a_cost_tracking style
  - Quick Start: add creds on UI, start proxy, launch agent, view logs
  - Examples: all Cursor Cloud Agents API endpoints
  - Advanced: virtual key usage
  - Screenshots: credential form, logs page, log detail view
- Add Cursor to sidebars.js under Pass-through Endpoints
- Add screenshots to docs/my-website/img/

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* docs: simplify Cursor doc - UI-only flow, no config.yaml needed

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix: cursor pass-through reads credentials from UI (litellm.credential_list)

The pass-through route now checks litellm.credential_list as a fallback
when CURSOR_API_KEY env var is not set. This means adding credentials
via the UI (Models + Endpoints → LLM Credentials) works without any
config.yaml or environment variable setup.

Credential lookup order:
1. passthrough_endpoint_router (config.yaml with use_in_pass_through)
2. litellm.credential_list (credentials added via UI)
3. CURSOR_API_KEY environment variable

Also respects api_base from UI credentials if set.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-02-28 14:50:06 -08:00
..
llm_provider_handlers Development environment setup (#22432) 2026-02-28 14:50:06 -08:00
test_llm_pass_through_endpoints.py Development environment setup (#22432) 2026-02-28 14:50:06 -08:00
test_method_specific_routing.py Add test got method speicifc routing 2026-02-19 11:58:48 +05:30
test_pass_through_endpoints.py fix: add custom_body parameter to endpoint_func in create_pass_through_route (#20849) 2026-02-13 16:44:40 -08:00
test_passthrough_endpoints_common_utils.py test fix location of encode bedrock runtime modelid arn 2025-08-22 17:34:09 -07:00
test_passthrough_guardrails_field_targeting.py chore: cleanup unused scripts and fix misplaced test file (#17611) 2025-12-08 19:00:55 -08:00
test_passthrough_guardrails.py [Feat] Add guardrails for pass through endpoints (#17221) 2025-11-27 12:06:53 -08:00
test_vertex_ai_batch_passthrough.py Fix batch tests 2026-01-22 19:23:32 +05:30
test_vertex_passthrough_load_balancing.py Fix test_vertex_passthrough_forwards_anthropic_beta_header 2026-02-26 13:06:25 +05:30