2e36e9782ee2235e97d765387ceb0fed57a406af
While working on fixing this: #37116. I reliased the current implementation of github copilot is not truly resilient to upstream changes. This PR enhances GitHub Copilot Chat to be forward-compatible with new AI model vendors and improves token counting accuracy by using vendor-specific tokenizers from the GitHub Copilot API. The system previously failed when GitHub added new model vendors like xAI with deserialization errors, and token counting wasn't utilizing the vendor-specific tokenizer information provided by the API. The solution adds an Unknown variant to the ModelVendor enum with serde other attribute to gracefully handle any new vendors GitHub introduces, implements tokenizer-aware token counting that uses the model's specified tokenizer mapping o200k_base to gpt-4o with fallback, adds explicit support for xAI models with proper tool input format handling, and includes comprehensive test coverage for unknown vendor scenarios. Key changes include adding the tokenizer field to model capabilities, implementing the tokenizer method on models, updating tool input format logic to handle unknown vendors, and simplifying token counting to use the vendor's specified tokenizer or fall back to gpt-4o. This ensures Zed's Copilot Chat integration remains robust and accurate as GitHub continues expanding their AI model provider ecosystem. Release Notes: - Enhanced model vendor compatibility to automatically support future AI providers and improved token counting accuracy using vendor-specific tokenizers from the GitHub Copilot --------- Signed-off-by: Umesh Yadav <git@umesh.dev>
language_models: Make Copilot Chat resilient to new model vendors and add tokenizer-based token counting (#37118)
Extract a scheduler crate from GPUI to enable unified integration testing of client and server code (#37326)
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Readme
586 MiB
Languages
Rust
94.7%
JSON-with-Comments
3.1%
Inno Setup
0.6%
Scheme
0.5%
Shell
0.3%
Other
0.4%