feat: synchronize fork with upstream v0.6.0-alpha.2#4
Merged
AlexMikhalev merged 126 commits intomainfrom Feb 7, 2026
Merged
Conversation
…ave the fn_arguments parsed
…eremychone#95) - Rename zhipu adapter to zai adapter - Implement namespace-based routing for regular vs coding endpoints - Regular models: "glm-4.6" → credit-based API - Coding models: "zai::glm-4.6" → subscription API - Add comprehensive example c07-zai.rs - Update adapter kind detection to handle "zai" namespace - Remove dual-endpoint complexity from user-facing API Co-authored-by: Rui Andrada <rui.andrada@imaginedone.com.br>
(cherry picked from commit 448e6ec)
* feat: parts thought signature * feat: gemini adapter thought signature support - Add ContentPart::ThoughtSignature with accessors and helpers. - Introduce InterStreamEvent::ThoughtSignatureChunk and ChatStreamEvent::ThoughtSignatureChunk. - Capture thought signatures into StreamEnd.captured_content when enabled. - Update printer to display ThoughtSignatureChunk events (non-captured). - Gemini adapter: parse thoughtSignature (fallback: thought) and include in outgoing messages. - Gemini streamer: surface thought as ThoughtSignatureChunk and record in captured_thought_signatures. - Preserve thoughtSignature in assistant history before tool calls when looping tools. - Example c10-tooluse-streaming.rs: switch to gemini-3-pro-preview, log thoughtSignature chunks, and prepend captured thoughts to assistant message. * chore: impl thought signature * chore: no API change
…opriate gemini thinkingLevel LOW/HIGH, fall back on budget if not gemini 3 or other effort
…r anthropic messages api (jeremychone#125)
…text parts (fixes jeremychone#135) (jeremychone#136) Co-authored-by: Ross MacLeod <rmm+github@z.odi.ac>
- fix - anthropic - streaming adapter now captures cache tokens ^ cache - anthropic - Adds them to prompt_tokens (matching into_usage behavior) ^ cache - anthropic - add TTL support for prompt caching - fix - anthropic - apply per-part cache_control on system messages and add cache TTL example
Merged 124 upstream commits from jeremychone/rust-genai while preserving fork-specific adapters: - AWS Bedrock (Converse API with Bearer token auth) - Cerebras (OpenAI-compatible) - OpenRouter (provider-pattern routing) - Zhipu (legacy, backwards compatibility) New features from upstream: - ModelSpec API for flexible model specification - MIMO and BigModel adapters - Enhanced ZAI with dual-endpoint support (zai:: and zai-coding::) - ThoughtSignature and ReasoningEffort improvements - Custom EventSourceStream replacing reqwest-eventsource - Enhanced error handling with request/response capture Breaking changes: - ZAi adapter renamed to Zai (upstream naming) - ZAI model list updated to upstream v0.6.0-alpha.2 Conflict resolution: - adapter_kind.rs: Merged all 19 adapter variants - dispatcher.rs: Added fork adapters to upstream dispatch - adapters/mod.rs: Export all adapter modules - Accepted upstream for streaming and chat improvements Tests updated for new adapter naming and model lists. Co-Authored-By: Terraphim AI <noreply@terraphim.io>
Apply cargo fmt to fix minor formatting inconsistencies in: - src/chat/tool/tool_response.rs (extra blank line) - tests/test_verify_model_lists.rs (println formatting) - tests/test_zai_adapter.rs (import order) Co-Authored-By: Terraphim AI <noreply@terraphim.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Upstream Features Integrated
Fork Features Preserved
Adapters (19 total)
OpenAI, OpenAIResp, Gemini, OpenRouter, Anthropic, Fireworks, Together, Groq, Mimo, Nebius, Xai, DeepSeek, Zai, BigModel, Cohere, Ollama, Cerebras, Bedrock, Zhipu
Test plan
cargo fmt --check- passescargo clippy- 6 warnings (all in upstream code)cargo build- compiles successfullycargo test --lib- 14/14 tests passcargo test --test mock_tests- 18/18 tests passcargo test --test test_adapter_consistency- verifies adapter code matches testscargo test --test test_verify_model_lists- verifies model resolutioncargo test --test test_zai_adapter- verifies ZAI adapterDefects Resolved
as_model_name_and_namespacerenamednamespace_and_name()size()methodsGenerated by Terraphim AI