mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-19 11:04:06 +00:00
|
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Follow-up to #64750. `LanguageModelProvider` mixes two concerns: serving requests to a model, and offering models to Zed's registry, picker and settings. Hosts that keep their own registry and UI but serve requests through this API had to stub out the registry and UI methods (`provided_models`, `default_model`, `authenticate`, `settings_view`, …). This splits the request methods into a new supertrait, `LanguageModelClient`: `stream_completion`, `stream_completion_text`, `stream_completion_tool`, `count_input_tokens`, `compact` and `api_key`, with signatures, docs and default bodies unchanged. `LanguageModelProvider: LanguageModelClient` keeps everything else. Each provider's request methods move into a separate `impl LanguageModelClient` block; no bodies change and no call sites change, since supertrait methods remain callable on `dyn LanguageModelProvider`. Provider-side sessions will live on `LanguageModelClient`. Tested: `language_model`, `language_models`, `language_models_cloud`, `copilot_chat`, `openai_subscribed`, `x_ai_subscribed`, and `agent` (753 tests), plus `cargo check --workspace --tests`. Release Notes: - N/A |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||