Ai api configs

From konglr/Lottery · View interactive version

Ai api configs is an AI agent skill from the GitHub repository konglr/Lottery. 本项目使用的 AI API 配置、技术指标规范及项目架构参考手册。

How to use this skill

Skill file

AI API 配置与技术规范

本文件汇总了项目中使用的所有 AI API 配置、技术指标规范及项目架构。所有 Agent 在协助开发时应参考此文件中的规范。


1. 阿里云 DashScope (Coding Plan)

| 品牌 | 模型 ID | 模型能力 |

| :--- | :--- | :--- |

| 千问 | qwen3.5-plus | 文本生成、深度思考、视觉理解 |

| 千问 | qwen3-max-2026-01-23 | 文本生成、深度思考 |

| 千问 | qwen3-coder-next | 文本生成 |

| 千问 | qwen3-coder-plus | 文本生成 |

| 智谱 | glm-5 | 文本生成、深度思考 |

| 智谱 | glm-4.7 | 文本生成、深度思考 |

| Kimi | kimi-k2.5 | 文本生成、深度思考、视觉理解 |

| MiniMax | ark-code-latest | 文本生成、深度思考 |

```r

apiKey <- Sys.getenv("ALIYUNCS_API_KEY")

# 使用 httr2 调用 OpenAI 兼容接口

```



2. Gemini API (New)

```python

import google.generativeai as genai

import os

api_key = os.getenv("GEMINI_API_KEY")

genai.configure(api_key=api_key)

model = genai.GenerativeModel('models/gemini-3-flash-preview')

response = model.generate_content("Hello")

```



3. NVIDIA NIM API (新增)

```python

import os

from openai import OpenAI

api_key = os.getenv("NV_API_KEY")

client = OpenAI(api_key=api_key, base_url="https://integrate.api.nvidia.com/v1")

# 测试 GLM-4.7

response = client.chat.completions.create(

model="z-ai/glm4.7",

messages=[{"role": "user", "content": "Hello"}]

)

```


5. Claude Code (tengu) 自定义模型配置指南

如果需要修改 Claude Code 终端工具使用的模型(如将 MiniMax 切换为火山引擎 ark-code-latest),需在以下三个位置进行同步:

  1. 环境变量 (~/.zshrc):
  1. 全局配置文件 (~/.claude.json):
  1. Session 状态文件 (~/.claude/settings.json):


6. 环境变量加载规范

项目推荐使用 .Renviron 文件管理敏感信息。在 Python 环境中,应优先尝试从项目根目录通过 load_renviron 函数或 os.getenv 直接读取。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.