彼方
7ea8b7c19a
Merge branch 'chenyme:main' into main
2025-12-19 11:04:41 +08:00
Chenyme
2385ec8eef
Merge pull request #76 from chenyme/retry
...
Retry
2025-12-19 10:50:13 +08:00
Chenyme
7ffb185951
fix: retry error
2025-12-17 00:43:44 +08:00
Chenyme
a2d59860a9
Update setting.toml
2025-12-17 00:29:57 +08:00
Chenyme
22d8fb9af9
feat: more retry & proxy pool
2025-12-17 00:29:51 +08:00
Chenyme
6ae39351a0
Merge pull request #75 from chenyme/concurrency
...
feat: optimize concurrency limit
2025-12-16 17:43:34 +08:00
Chenyme
1ddec29ffb
feat: optimize concurrency limit
2025-12-16 17:38:15 +08:00
Chenyme
23acbb9bb2
Merge branch 'main' of https://github.com/chenyme/grok2api
2025-12-16 16:40:39 +08:00
Chenyme
3aef4347d7
fix: automatically disable token expiration
2025-12-16 16:40:32 +08:00
Chenyme
173638406a
Merge pull request #73 from itismygo/fix-imagine-image-generation
...
fix: 修复 grok-imagine-0.9 同时支持文生图和图生视频
2025-12-16 16:34:03 +08:00
itismygo and Claude Sonnet 4.5
eff701c485
fix: 修复 grok-imagine-0.9 同时支持文生图和图生视频
...
- 恢复 is_video_model: True 以支持视频生成
- 更新模型描述说明支持两种模式
- 保留空列表安全访问修复
根据 xAI 官方文档,grok-imagine-0.9 支持:
1. 文本 → 图片 (text-to-image)
2. 图片 + 文本 → 视频 (image-to-video)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-12 04:14:01 +00:00
itismygo
300b03fdde
fix: 修复 grok-imagine-0.9 纯文本生成图片的bug
...
## 问题描述
当使用 grok-imagine-0.9 模型进行纯文本到图片生成时,会抛出 "list index out of range" 错误。
## 根本原因
1. **模型配置错误**: grok-imagine-0.9 被错误地标记为视频模型 (`is_video_model: True`)
2. **数组访问bug**: 在没有图片附件时,代码尝试访问空列表的第一个元素 `payload.get("fileAttachments", [""])[0]`
## 修复内容
### app/models/grok_models.py
- 将 `is_video_model` 从 `True` 改为 `False`
- 更新 description 为 "Image generation model powered by Grok"
### app/services/grok/client.py
- 修复空列表访问bug,使用安全的访问方式:
```python
file_attachments = payload.get("fileAttachments", [])
ref_id = post_id or (file_attachments[0] if file_attachments else "")
```
## 测试结果
✅ 纯文本生成图片:成功
✅ 文本对话:正常
✅ 其他模型:不受影响
## 相关信息
根据 xAI 官方文档,Grok Imagine 主要是图像生成模型(使用 Aurora 引擎),支持 text-to-image 功能。
2025-12-12 02:26:29 +00:00
Chenyme
cd72db567a
fix: include setting.toml in Docker image to prevent first-run failure
2025-11-22 14:05:15 +08:00
Chenyme
93dc1f16a4
merge: pull request #62 from bloodycrownD/patch-1
...
fix: index assignment in OpenAIChatCompletionChunkChoice
2025-11-22 13:58:36 +08:00
Chenyme
1a16748abd
fix: delete the "chunk_index"
2025-11-22 13:57:22 +08:00
Chenyme
8d24d2695f
Merge: pull request #61 from FakerL/main
...
fix: use Redis.from_url() for proper SSL support
2025-11-22 13:49:13 +08:00
bloodycrownD
aa02c32fa1
Fix index assignment in OpenAIChatCompletionChunkChoice
2025-11-22 00:50:26 +08:00
Zhi Yang and Claude
685c2b576e
fix: use Redis.from_url() for proper SSL support
...
Replace custom _parse_url() with redis.Redis.from_url() which properly
handles rediss:// SSL connections and all URL parameters.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-21 14:58:24 +00:00
Chenyme
6599b1b283
feat: adjust the count display
2025-11-21 00:41:30 +08:00
Chenyme
6b215945d3
fix: add orjson 3.11.4 requirements
2025-11-20 17:22:25 +08:00
Chenyme
db73406dae
feat: review python code & optimize code structure
2025-11-20 17:15:02 +08:00
Chenyme
0c6c36f999
fix: docker volume missing setting.toml
2025-11-20 14:07:34 +08:00
Chenyme
7191a59097
docs: update readme.md
2025-11-18 10:22:12 +08:00
Chenyme
9df0ba5e11
fix: corrected parameters of the grok-4.1-thinking model
2025-11-18 10:09:17 +08:00
Chenyme
eeb4f7120d
feat: support new model grok 4.1
2025-11-18 09:50:07 +08:00
Chenyme
e7081ffa4b
Merge pull request #54 from tdh62/main
...
fix: correct base64 string validation logic
2025-11-18 09:10:18 +08:00
tdh
5668fd8b61
fix: correct base64 string validation logic
2025-11-15 06:00:49 +08:00
Chenyme
e8485c37a1
feat: improve some error message details
2025-10-29 00:09:13 +08:00
Chenyme
351d8bf4fe
feat: support dynamic headers
2025-10-28 21:41:31 +08:00
Chenyme
b5b817ebcd
feat: optimize logging and fix timeout calculation issues
2025-10-28 20:41:28 +08:00
Chenyme
b9c67f972a
Merge pull request #39 from yyg-max/main
...
feat: Support video
2025-10-28 14:42:50 +08:00
Chenyme
080c69011d
Merge branch 'main' into main
2025-10-28 14:42:34 +08:00
Chenyme
78de3c7479
chore: integrate into existing architecture
2025-10-28 14:41:28 +08:00
Chenyme
48e3705911
feat: optimizing the request body
2025-10-28 14:30:28 +08:00
yyg-max
275e7bb4b4
video
2025-10-28 13:54:37 +08:00
Chenyme
3df652f943
docs: update readme.md
2025-10-23 08:48:36 +08:00
Chenyme
987a779928
Merge pull request #34 from chenyme/nothink
...
feat: support not show think
2025-10-23 08:32:27 +08:00
Chenyme
4b2e4aef2c
feat: update file format
2025-10-23 08:30:30 +08:00
Chenyme
23b1cf574d
feat: support not show think
2025-10-23 08:28:37 +08:00
Chenyme
63f5e378fd
fix: don't show again cf_clearance
2025-10-22 20:58:31 +08:00
Chenyme
192fb31ea3
Merge pull request #32 from chenyme/test
...
feat: support test SSO
2025-10-22 17:34:02 +08:00
Chenyme
16aa0122cf
feat: support test SSO
2025-10-22 17:32:16 +08:00
Chenyme
3e2403095c
Merge pull request #30 from chenyme/tags
...
feat: support SSO tags
2025-10-22 16:17:26 +08:00
Chenyme
5059890b54
feat: support SSO tags
2025-10-22 16:16:19 +08:00
Chenyme
0174cae51a
Merge pull request #24 from chenyme/proxy
...
feat: support cache proxy url
2025-10-17 16:24:34 +08:00
Chenyme
a2c311883d
feat: support cache proxy url
2025-10-17 16:24:11 +08:00
Chenyme
a9a08c18eb
Merge pull request #23 from chenyme/retry
...
feat: add automatic retry mechanism
2025-10-17 13:43:20 +08:00
Chenyme
09453e71b9
feat: add automatic retry mechanism
2025-10-17 13:42:08 +08:00
Chenyme
c2a5b8dcd2
Merge branch 'main' of https://github.com/chenyme/grok2api
2025-10-17 13:12:26 +08:00
Chenyme
fce8c9b2a0
feat: optimize build speed
2025-10-17 13:11:50 +08:00