feat: add standalone web server mode#398
Closed
ZeroRegister wants to merge 176 commits intolbjlaq:mainfrom
Closed
Conversation
…fied squircle icons
- 🔧 API 代理优化: 403 错误智能处理、Claude CLI 响应优化 - 🐛 Bug 修复: OAuth 环境检查优化 - 📝 文档更新: 更新 README 和更新日志 - 🧹 项目清理: 移除无用的测试文件和 Python 脚本
- 🔇 忽略 造成的空文本警告 (这是 Gemini 的内部思考过程) - 🔧 移除 参数传递, 避免 Gemini 尝试调用工具导致
- Extract web search model to named constant for maintainability - Add informative logging for tool injection decisions
- Add parse_error_count and last_valid_state tracking to StreamingState - Implement handle_parse_error() for graceful degradation - Add reset_error_state() for recovery after errors - Include debug logging for troubleshooting - Warn on high error rates (>5 errors)
- Add changelog for PR lbjlaq#289 (Claude Protocol Robustness Improvements) - Add changelog for PR lbjlaq#285 (Dashboard Statistics Fix) - Update version in all config files - Update version display in Settings page
Configure git to normalize all text files to LF line endings. This prevents CRLF/LF inconsistencies across different platforms.
Add SafetyThreshold enum and environment variable configuration for Gemini API safety filters. Users can now control content filtering via GEMINI_SAFETY_THRESHOLD environment variable. Supported values: OFF, LOW, MEDIUM, HIGH, NONE Default behavior (OFF) is preserved for backwards compatibility.
Add OutputConfig struct with effort field for Claude API v2.0.67+ compatibility. Maps Claude's output_config.effort values (high, medium, low) to Gemini's effortLevel configuration. Changes: - Added OutputConfig struct to models.rs - Added output_config field to ClaudeRequest - Added effort level mapping in build_generation_config() - Updated all test cases with output_config: None
Move background task model names to module-level constants for better maintainability. This allows easier configuration and centralized model management. Changes: - Added BACKGROUND_MODEL_LITE constant (gemini-2.5-flash-lite) - Added BACKGROUND_MODEL_STANDARD constant (gemini-2.5-flash) - Updated select_background_model() to use constants Note: WEB_SEARCH_FALLBACK_MODEL was already a const in request.rs
Add automatic thinking mode enablement for Opus 4.5 models, matching Claude Code v2.0.67+ behavior where thinking is enabled by default for these models. Changes: - Added should_enable_thinking_by_default() function - Opus 4.5 variants now auto-enable thinking when no config provided - Models with "-thinking" suffix also get auto-enabled This improves compatibility with Claude Code clients that expect Opus 4.5 to use thinking mode by default.
Add randomized jitter (±20%) to all retry delay strategies to prevent thundering herd problem when multiple requests fail simultaneously. Changes: - Added JITTER_FACTOR constant (0.2 = ±20%) - Added apply_jitter() helper function - Updated FixedDelay, LinearBackoff, and ExponentialBackoff to use jitter - Enhanced logging to show both base and actual delay values This improves stability under high load by distributing retry attempts over time instead of synchronizing them.
Convert CRLF line endings to LF for consistency across platforms. This ensures the .gitattributes configuration takes effect and prevents future line ending inconsistencies. Files normalized: - src-tauri/src/proxy/handlers/openai.rs - src-tauri/src/proxy/mappers/claude/streaming.rs - src-tauri/src/proxy/mappers/openai/request.rs - src-tauri/src/proxy/mappers/openai/streaming.rs
Fixes Issue lbjlaq#295 where Gemini 3 Pro rejects function calls without thought_signature when thinking mode is enabled. Changes: - Add has_valid_signature_for_function_calls() helper function - Add MIN_SIGNATURE_LENGTH constant (10 chars minimum) - Auto-disable thinking mode if no valid signature available - Prevents 400 "Function call is missing a thought_signature" errors
Fixes Issue lbjlaq#290 where Anthropic API rejects requests with cache_control in thinking blocks causing "Extra inputs are not permitted" errors. Changes: - Add deep_remove_cache_control() recursive JSON cleaner - Apply cleanup before forwarding to Anthropic API - Works regardless of serde annotations
Fixes tool calling issues where Gemini uses different parameter names than Claude Code expects (e.g., "query" vs "pattern"). Changes: - Add remap_function_call_args() for known tool remappings - Handle Grep: query → pattern - Handle Glob: query → pattern - Handle Read: path → file_path - Apply remapping in both streaming and non-streaming paths
Adds additional JSON Schema fields to the cleanup blacklist for better compatibility with MCP tool definitions. New fields added: - $id: JSON Schema identifier - contentEncoding: base64 encoding hint - contentMediaType: MIME type hint - deprecated: Gemini doesn't understand this - readOnly, writeOnly: access modifiers
Captures thought_signature from thinking blocks immediately rather than waiting for function calls, improving signature availability for subsequent requests. Changes: - Store signature to global storage in process_thinking() - Add debug logging for captured signatures - Improves Issue lbjlaq#295 fix by ensuring signatures are available earlier
- Fix Issue lbjlaq#298: Opus 4.5 first request error - Merge PR lbjlaq#296: Claude Code compatibility enhancements - Extended signature validation to all first-time thinking requests - Added cache_control recursive cleanup - Added tool parameter remapping - Added configurable safety settings - Added effort parameter support - Added retry jitter optimization
- Add axum-based REST API layer (web_api.rs) - Add standalone server binary (antigravity-server) - Add frontend Tauri compatibility layer (tauriCompat.ts) - Add HTTP request adapter with endpoint mapping (request.ts) - Update all components to use compatibility APIs - Add manual OAuth callback URL support for remote deployment - Add deployment documentation (DEPLOYMENT.md) - Add packaging script (package-server.sh)
|
请问现在可以用了吗 |
|
等这个功能好久了,希望能出 |
|
期待,no no-vnc的一天 |
|
期待,上线蹲一下 |
|
同样很期待,现在docker很不方便 @lbjlaq |
|
@lbjlaq readme中可以加一下web mode的启动说明嘛~ |
|
@lbjlaq docker 回调公网url长什么样,url的后半断能给个示例吗 |
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.
🚀 功能: 独立 Web 服务端模式
概述
本 PR 为 Antigravity Manager 添加了独立 Web 服务端模式,允许将应用部署到远程 Linux 服务器通过浏览器访问,无需 Tauri 桌面环境。
主要改动
后端
tauri-app/web-server) 分离代码路径前端
文档
使用方式