Commit Graph

1350 Commits

Author SHA1 Message Date
erio
c37c68a341 feat: append auth token to purchase iframe url 2026-02-28 16:02:55 +08:00
erio
9230d3cbc9 fix: streamline purchase embed layout with floating open button 2026-02-28 15:26:16 +08:00
erio
19925e22d9 chore: bump version to 0.1.87.3 2026-02-28 14:09:02 +08:00
erio
94bdde32bb chore: bump version to 0.1.87.2 2026-02-28 10:37:42 +08:00
erio
9555a99d1c chore: bump version to 0.1.87.1 2026-02-27 21:24:03 +08:00
erio
0e69895603 Merge branch 'main' into release/custom-0.1.87
# Conflicts:
#	frontend/src/components/keys/UseKeyModal.vue
2026-02-27 21:20:22 +08:00
erio
cc3cf1d70a chore: bump version to 0.1.86.10 2026-02-27 21:02:24 +08:00
erio
3382d496e3 refactor: remove unused detectClaudeMaxCacheBillingOutcomeForUsage function 2026-02-27 20:56:33 +08:00
erio
e0b4b00dc1 chore: bump version to 0.1.86.9 2026-02-27 20:45:52 +08:00
erio
81d896bf78 fix: sync Antigravity ForwardResult.Usage with client response simulation
Apply Claude Max cache billing to usage before returning ForwardResult
in Antigravity Forward, ensuring RecordUsage gets the same simulated
usage that clients see. Restore apply+fallback in RecordUsage for
consistency across GatewayService and Antigravity paths.
2026-02-27 20:42:53 +08:00
erio
ec576fdbde chore: bump version to 0.1.86.8 2026-02-27 19:59:51 +08:00
erio
741eae59bb refactor: decouple claude max cache simulation from RecordUsage
Extract setupClaudeMaxStreamingHook and applyClaudeMaxNonStreamingRewrite
facade functions to helpers file. RecordUsage now uses detect-only (no
mutation), client response rewriting handled at Forward layer.
2026-02-27 19:59:36 +08:00
erio
d1b684b782 fix: add 2K image default pricing at 1.5x base price
Previously 2K images used the same base price as 1K ($0.134).
Now 2K uses 1.5x multiplier ($0.201), consistent with 4K using 2x ($0.268).

- Backend: add 2K size branch in getDefaultImagePrice
- Frontend: update 2K placeholder from 0.134 to 0.201
- Tests: update assertions for new 2K default price
2026-02-27 17:37:30 +08:00
erio
505494b378 fix: update 2K image price placeholder from 0.134 to 0.201 2026-02-27 17:18:24 +08:00
erio
c1033c12bd chore: bump version to 0.1.86.6 2026-02-27 16:38:35 +08:00
erio
b789333b68 test: stabilize subscription progress day assertion 2026-02-27 16:35:37 +08:00
erio
61ef73cb12 refactor: isolate claude max response usage simulation by group toggle 2026-02-27 16:14:07 +08:00
Wesley Liddick
19ea392d5d Merge pull request #663 from touwaeriol/fix/update-antigravity-useragent-version
fix: update antigravity user-agent version to 1.19.6
2026-02-27 15:28:45 +08:00
erio
e71be7e0f1 fix: update image pricing tests for 2K tier and refactor claude max billing policy
- Update 5 test assertions to match new 2K default price ($0.201 = base * 1.5)
- Refactor claude max cache billing policy into reusable functions
2026-02-27 15:13:05 +08:00
erio
0302c03864 fix: add 2K image pricing at 1.5x base price 2026-02-27 15:00:18 +08:00
erio
d21fe54d55 chore: bump version to 0.1.86.5 2026-02-27 12:55:05 +08:00
erio
a70d3ff82d fix: update antigravity user-agent version to 1.19.6 2026-02-27 12:36:50 +08:00
erio
afec747d9e fix: update antigravity user-agent version to 1.19.6
Update the default user-agent version from 1.18.4 to 1.19.6
to match the latest official antigravity client.
2026-02-27 12:31:51 +08:00
erio
574359f1df chore: bump version to 0.1.86.4 2026-02-27 12:24:02 +08:00
erio
6da2f54e50 refactor: decouple claude max cache policy and add tokenizer 2026-02-27 12:18:22 +08:00
erio
886464b2e9 Merge branch 'feature/claude-max-simulation-review' into release/custom-0.1.86
# Conflicts:
#	backend/cmd/server/VERSION
2026-02-27 09:58:01 +08:00
erio
7388fcce41 fix: gofmt alignment in constants.go 2026-02-27 09:52:50 +08:00
erio
a6f9f9f968 feat: replace gemini-3-pro-image with gemini-3.1-flash-image
- Add migration 060 to update model_mapping for all antigravity accounts
- Remove gemini-3-pro-image and gemini-3-pro-image-preview mappings
- Add gemini-3.1-flash-image and gemini-3.1-flash-image-preview mappings
- Update frontend usage window to show GImage for new model
- Update isImageGenerationModel to support new model
2026-02-27 09:52:50 +08:00
erio
396044e354 fix: gofmt alignment in constants.go 2026-02-27 09:36:23 +08:00
erio
3d15202124 chore: bump version to 0.1.86.3 2026-02-27 09:30:58 +08:00
erio
756b09b6b8 feat: replace gemini-3-pro-image with gemini-3.1-flash-image
- Add migration 060 to update model_mapping for all antigravity accounts
- Remove gemini-3-pro-image and gemini-3-pro-image-preview mappings
- Add gemini-3.1-flash-image and gemini-3.1-flash-image-preview mappings
- Update frontend usage window to show GImage for new model
- Update isImageGenerationModel to support new model
2026-02-27 09:30:44 +08:00
erio
f4d3fadd6f chore: bump version to 0.1.86.2 2026-02-27 01:55:25 +08:00
erio
1fb6e9e830 feat: add claude max usage simulation with group switch 2026-02-27 01:54:54 +08:00
alfadb
e6969acb50 fix: address review - fix log wording and add response body assertion in test 2026-02-26 23:49:30 +08:00
alfadb
9489531431 fix(gateway): return 404 instead of fake 200 for unsupported count_tokens endpoint
PR #635 returned HTTP 200 with {"input_tokens": 0} when upstream doesn't
support count_tokens (404). This caused Claude Code CLI to trust the zero
value, believing context uses 0 tokens, so auto-compression never triggers.

Fix: return 404 with proper error body so CLI falls back to its local
tokenizer for accurate estimation. Return nil (not error) to avoid
polluting ops error metrics with expected 404s.

Affected paths:
- Passthrough APIKey accounts: upstream 404 now passed through as 404
- Antigravity accounts: same fix (was also returning fake 200)
2026-02-26 23:34:53 +08:00
shaw
4ac57b4edf fix: 临时移除fast-mode-2026-02-01避免429问题 2026-02-26 15:44:28 +08:00
Wesley Liddick
0dd6986e28 Merge pull request #639 from cagedbird043/pr/refactor-antigravity-model-source
refactor(admin): 消除测试连接 Gemini 模型硬编码,统一由 DefaultModels 提供
2026-02-26 14:57:13 +08:00
cagedbird043
2fd6ac319b feat(antigravity): 添加 Claude Opus/Sonnet 4.6 后端模型定义 2026-02-26 14:27:51 +08:00
cagedbird043
ba69736f55 refactor(admin): 测试连接模型列表改为复用 antigravity.DefaultModels,消除硬编码重复 2026-02-26 13:34:10 +08:00
shaw
c75c6b6858 fix: 将 DriveClient 注入 GeminiOAuthService,消除单元测试中的真实 HTTP 调用
FetchGoogleOneTier 原先在方法内部直接创建 DriveClient 实例,
导致单元测试中对 googleapis.com 发起真实 HTTP 请求,在 CI 环境
产生 401 错误。

将 DriveClient 作为依赖注入到 GeminiOAuthService,遵循项目
端口与适配器架构规范:
- 新增 repository/gemini_drive_client.go 作为 Provider
- 注册到 repository Wire ProviderSet
- 测试中使用 mockDriveClient 替代真实调用
2026-02-26 10:53:04 +08:00
Wesley Liddick
de61745bb2 Merge pull request #635 from alfadb/fix/count-tokens-fallback-for-proxy
fix: count_tokens 端点不支持时降级返回空值
2026-02-26 10:07:30 +08:00
alfadb
03bcd94ae5 fix: count_tokens 端点不支持时降级返回空值 (404 only)
第三方 Anthropic 中转站通常不支持 /v1/messages/count_tokens 端点,
上游返回 404 时降级返回 {input_tokens: 0},客户端 fallback 到本地估算。

- 仅匹配 404 状态码,语义明确:端点不存在
- 其他错误 (400/429/500) 保留原始处理链和 ops 遥测
- 无需解析错误消息内容,不依赖字符串匹配
- 新增 table-driven 测试覆盖 fallback 和 non-fallback 路径
2026-02-26 09:28:45 +08:00
cagedbird043
ece911521e fix(antigravity): 修正 Gemini 3.1 Pro High/Low 发布日期为 2026-02-19 2026-02-25 20:18:19 +08:00
erio
5c07e11473 refactor: remove unused UserAgent constant
The UserAgent constant was never referenced; all HTTP requests
use GetUserAgent() which reads from defaultUserAgentVersion
(configurable via ANTIGRAVITY_USER_AGENT_VERSION env var).
2026-02-25 20:08:44 +08:00
erio
d552ad7673 fix: 修复合并后的重复代码和闭包签名不匹配
- 删除 account_handler.go 中重复的 CheckMixedChannel 函数
- 修复 gateway_handler.go 闭包调用传参不匹配(上游已改为闭包捕获)
- 恢复 docker-compose.yml 中缺失的 postgres_data volume 定义
2026-02-25 19:24:56 +08:00
erio
496173da1f merge: 合并上游 v0.1.86 到 main 分支 2026-02-25 19:02:10 +08:00
cagedbird043
5d95e59742 fix(admin): 补全 antigravity 测试连接下拉框的 Gemini 模型列表 2026-02-25 18:51:47 +08:00
cagedbird043
01d084bbfd feat(antigravity): 新增 Gemini 3.1 Pro High 和 Gemini 3.1 Pro Low 模型支持 2026-02-25 18:51:47 +08:00
shaw
15f3ffb165 chore: 调整模型定价文件仓库 2026-02-25 13:50:21 +08:00
huangenjun
935ea66681 fix: 修复 sora_sdk_client 类型断言未检查的 errcheck lint 错误
使用安全的 comma-ok 模式替代裸类型断言,避免 golangci-lint errcheck 报错。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:43:08 +08:00