Skip to content

Commit c47587e

Browse files
Release v0.1.6a1 (#82)
* chore: bump version, fix security issue CVE-2026-32274 with black * Feature/reasoning responses (#81) * chore: make new docker-compose-observe-multiple.yaml Add Makefile * feature: add reasoning answers to Responses API in right format * chore: add opencode.json * feature: add qdrant to compose, add modalities and limit to opencode.json * security: fix CVE-2025-59420 on pyjwt * bugfix: fix streaming in mitmproxy * feature: add script to mitmproxy * fix: fix streaming in both composes * bugfix: fix script * up compose * feature: add batching and files for openai (#83) * feature: add batching and files for openai * feature: add batching and files for anthropic * feature: add batching and files for anthropic (2) * refactor pt1 * refactor pt2 * refactor pt3 * chore: update openapi specs * chore: update AGENTS.md * chore: add examples to batches * chore: up .env.example * chore: add README.md for qwen-code * Feature/workflow updates (#86) * feature: add stale-issues workflow * feature: add ru version of templates * chore: move compose files to folder compose/ * chore: move compose files to folder compose/ * feature: add new workflows * feature: add new workflows * chore: up .gitignore * feature: add ci_smoke * chore: up workflows * feature: add xcode intergration * security fixes * security: fix might be referenced before assignment * bugfix(batches): fix datetime for python 3.10 * Update coverage badge for release/v0.1.6 * bump version * feature: map extra_body to additional_fields * refactor: examples * bugfix: completion_window openai * chore: delete examples from .gitignore * Update coverage badge for release/v0.1.6 * refactor: move examples to folders * bugfix: fix path_normalizer.py * refactor: move litellm /model/info to another folder * chore: ruff lint * Update coverage badge for release/v0.1.6 * bugfix: update batch API * chore: update anthropic example * chore: update openai example * chore: update openai files example * chore: ruff * chore: update docs before release --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 58f664a commit c47587e

File tree

121 files changed

+6151
-1875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+6151
-1875
lines changed

.env.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
# ==============================================================================
3131

3232
# --- Настройки прокси ---------------------------------------------------------
33-
GPT2GIGA_MODE=PROD
33+
GPT2GIGA_MODE=DEV
3434
GPT2GIGA_HOST=0.0.0.0
3535
GPT2GIGA_PORT=8090
36-
GPT2GIGA_USE_HTTPS=False
3736
GPT2GIGA_LOG_LEVEL=INFO
3837
GPT2GIGA_ENABLE_API_KEY_AUTH=True
3938
GPT2GIGA_API_KEY="<REPLACE_WITH_STRONG_SECRET>"

.github/AGENTS.md

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,76 @@
1-
# AGENTS.md — .github/ (CI/CD + templates)
1+
# AGENTS.md — .github/
22

33
## Package Identity
44

5-
- **What:** GitHub Actions workflows + PR/issue templates for `gpt2giga`
6-
- **Scope:** CI checks, Docker publishing, PyPI publishing, coverage badge automation
5+
- **What:** GitHub Actions workflows plus PR and issue templates
6+
- **Scope:** CI, security automation, coverage badge generation, Docker publishing, PyPI release publishing, release drafting, triage automation
77

8-
## Setup & Run
8+
## Local Validation
99

1010
```bash
11-
# Workflows run in GitHub Actions; locally you typically validate by running:
1211
uv sync --all-extras --dev
13-
uv run ruff check . && uv run ruff format --check .
12+
uv run ruff check .
13+
uv run ruff format --check .
1414
uv run pytest tests/ --cov=. --cov-fail-under=80
1515
```
1616

17-
## Patterns & Conventions
18-
19-
- **CI should match local DoD**: keep `.github/workflows/ci.yaml` aligned with root “Definition of Done”.
20-
- **Keep secrets scoped**: publishing workflows must only use `secrets.*` where required.
21-
- **Python matrix support**: CI tests on Python `3.10``3.14` (don’t add syntax that breaks older versions).
22-
23-
Examples:
24-
25-
- ✅ DO: Update the main CI steps in `.github/workflows/ci.yaml`
26-
- ✅ DO: Update Docker publishing in `.github/workflows/publish-ghcr.yml` and `.github/workflows/docker_image.yaml`
27-
- ❌ DON'T: Add repo secrets into workflow YAML (keep secrets in GitHub settings; compare with `.github/workflows/publish-pypi.yml`)
28-
- ❌ DON'T: Treat scratch files as CI inputs (e.g. `local/concurrency_test.py`; CI is intended to validate `gpt2giga/` + `tests/` only)
17+
## Workflow Map
18+
19+
| File | Purpose |
20+
|---|---|
21+
| `.github/workflows/ci.yaml` | Ruff + pytest across Python `3.10``3.14`, uploads coverage, regenerates badge |
22+
| `.github/workflows/docker_image.yaml` | Publishes Docker Hub images for Python `3.10``3.14` |
23+
| `.github/workflows/publish-ghcr.yml` | Publishes GHCR images for Python `3.10``3.14`; `latest` tracks Python `3.13` |
24+
| `.github/workflows/publish-pypi.yml` | Builds with `uv` and publishes to PyPI on release |
25+
| `.github/workflows/codeflash.yaml` | Runs Codeflash optimization on PRs touching `gpt2giga/**` |
26+
| `.github/workflows/stale-issues.yaml` | Marks inactive issues as stale and closes them after a grace period |
27+
| `.github/workflows/dependency-review.yaml` | Reviews dependency changes on pull requests |
28+
| `.github/workflows/actionlint.yaml` | Lints GitHub Actions workflow files |
29+
| `.github/workflows/codeql.yaml` | Runs weekly and on-change CodeQL analysis for Python |
30+
| `.github/workflows/pip-audit.yaml` | Audits installed Python dependencies for known vulnerabilities |
31+
| `.github/workflows/nightly-smoke.yaml` | Runs scheduled app-level smoke tests against the FastAPI app factory |
32+
| `.github/workflows/docker-smoke.yaml` | Builds the default Docker image and verifies `/health` comes up |
33+
| `.github/workflows/pr-labeler.yaml` | Applies path-based labels to pull requests |
34+
| `.github/workflows/release-drafter.yaml` | Keeps the draft GitHub release notes up to date |
35+
| `.github/dependabot.yml` | Weekly Dependabot updates for GitHub Actions dependencies |
36+
| `.github/labeler.yml` | Path-to-label mapping used by the PR labeler workflow |
37+
| `.github/release-drafter.yml` | Release note categories and templates for Release Drafter |
38+
| `.github/PULL_REQUEST_TEMPLATE.md` | PR checklist |
39+
| `.github/ISSUE_TEMPLATE/bug_report.md` | Bug report template |
2940

30-
## Touch Points / Key Files
41+
## Patterns & Conventions
3142

32-
- **CI (lint + tests + coverage)**: `.github/workflows/ci.yaml`
33-
- **Docker Hub build/push**: `.github/workflows/docker_image.yaml`
34-
- **GHCR multi-python images**: `.github/workflows/publish-ghcr.yml`
35-
- **PyPI release publishing**: `.github/workflows/publish-pypi.yml`
36-
- **Codeflash optimization**: `.github/workflows/codeflash.yaml`
37-
- **PR checklist**: `.github/PULL_REQUEST_TEMPLATE.md`
38-
- **Bug report template**: `.github/ISSUE_TEMPLATE/bug_report.md`
43+
- Keep CI aligned with the root Definition of Done.
44+
- Preserve the Python compatibility matrix unless the package support policy changes too.
45+
- Use GitHub secrets only where required; never inline credentials in workflow YAML.
46+
- Badge generation depends on both `.github/workflows/ci.yaml` and `scripts/generate_badge.py`; change them together.
47+
- `publish-pypi.yml` validates that the release tag matches `pyproject.toml` version; keep that contract intact.
48+
- `codeflash.yaml` currently uses `pip` and `poetry`, unlike the rest of the repo's `uv`-first tooling. Treat that as intentional unless you are updating the workflow itself.
49+
- `actions/labeler` expects labels referenced in `.github/labeler.yml` to exist in the repository settings; this repo does not auto-create them.
3950

40-
## JIT Index Hints
51+
## Quick Find Commands
4152

4253
```bash
43-
# Find uv/ruff/pytest invocations
44-
rg -n "uv sync|uv run ruff|uv run pytest" .github/workflows/
54+
# Find uv-based workflow steps
55+
rg -n "uv sync|uv run|uv build|uv publish" .github/workflows
56+
57+
# Find Docker tag logic
58+
rg -n "tags:|IMAGE_NAME|VERSION" .github/workflows
4559

46-
# Find where Docker tags are defined
47-
rg -n "tags:|IMAGE_NAME|VERSION=" .github/workflows/
60+
# Find coverage badge wiring
61+
rg -n "coverage.json|generate_badge|coverage.svg" .github/workflows
4862
```
4963

5064
## Common Gotchas
5165

52-
- `ci.yaml` generates a coverage badge and may commit `badges/coverage.svg` to the branch; if you change badge generation, update both the workflow and `scripts/generate_badge.py`.
53-
- Publishing workflows are triggered by tags/releases; ensure version/tag expectations stay consistent with `pyproject.toml`.
66+
- `ci.yaml` downloads the `coverage-3.12` artifact to generate the badge; if artifact naming changes, update both steps.
67+
- `docker_image.yaml` and `publish-ghcr.yml` both build multi-arch images; keep version tagging consistent with `pyproject.toml`.
68+
- `publish-pypi.yml` clears `dist/` before build, so release packaging assumptions should not rely on checked-in artifacts.
5469

55-
## Pre-PR Checks
70+
## Pre-PR Check
5671

5772
```bash
58-
uv run ruff check . && uv run ruff format --check . && uv run pytest tests/ --cov=. --cov-fail-under=80
73+
uv run ruff check .
74+
uv run ruff format --check .
75+
uv run pytest tests/ --cov=. --cov-fail-under=80
5976
```
60-
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
name: Отчет об ошибке
3+
about: Сообщите об ошибке, чтобы помочь нам улучшить gpt2giga
4+
title: "[БАГ] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Описание ошибки
10+
11+
<!-- Четко и кратко опишите ошибку -->
12+
13+
## Окружение
14+
15+
### Настройка gpt2giga
16+
17+
- **Версия gpt2giga**: <!-- например, 0.5.0 -->
18+
- **Способ установки**:
19+
- [ ] pip (`pip install gpt2giga`)
20+
- [ ] uv (`uv tool install gpt2giga` / `uv add gpt2giga`)
21+
- [ ] Docker (`docker compose up`)
22+
- [ ] Из исходников (`pip install git+...`)
23+
24+
- **Версия Python**: <!-- например, 3.10 -->
25+
- **ОС**: <!-- например, Ubuntu 22.04, macOS 14.0, Windows 11 -->
26+
27+
### Конфигурация GigaChat
28+
29+
- **Модель GigaChat**: <!-- например, GigaChat, GigaChat-2-Max -->
30+
- **Настройки авторизации**: <!-- например, OAuth(scope+creds), Basic(user+password) -->
31+
32+
## Как воспроизвести
33+
34+
### Используемый метод
35+
36+
- [ ] OpenAI Python SDK
37+
- [ ] curl
38+
- [ ] Другое: <!-- укажите -->
39+
40+
### Тело запроса
41+
42+
<!--
43+
Приведите полный запрос, который вы отправляете.
44+
Удалите любые чувствительные данные (учетные данные, токены и т. д.)
45+
-->
46+
47+
<details>
48+
<summary>Запрос</summary>
49+
50+
**Для OpenAI SDK:**
51+
52+
```python
53+
from openai import OpenAI
54+
55+
client = OpenAI(base_url="http://localhost:8090", api_key="your-key")
56+
57+
# Ваш запрос здесь
58+
completion = client.chat.completions.create(
59+
model="gpt-4",
60+
messages=[
61+
{"role": "user", "content": "Ваше сообщение"}
62+
],
63+
# ... другие параметры
64+
)
65+
```
66+
67+
**Для curl:**
68+
69+
```bash
70+
curl -X POST http://localhost:8090/v1/chat/completions \
71+
-H "Content-Type: application/json" \
72+
-H "Authorization: Bearer your-key" \
73+
-d '{
74+
"model": "gpt-4",
75+
"messages": [
76+
{"role": "user", "content": "Ваше сообщение"}
77+
]
78+
}'
79+
```
80+
81+
</details>
82+
83+
### Шаги для воспроизведения
84+
85+
1. Запустите gpt2giga командой: `...`
86+
2. Отправьте запрос: `...`
87+
3. Наблюдайте ошибку
88+
89+
## Ожидаемое поведение
90+
91+
<!-- Что, по вашему ожиданию, должно было произойти -->
92+
93+
## Фактическое поведение
94+
95+
<!-- Что произошло на самом деле -->
96+
97+
## Вывод ошибки
98+
99+
<details>
100+
<summary>Сообщение об ошибке / Traceback</summary>
101+
102+
```
103+
Вставьте сюда текст ошибки или traceback
104+
```
105+
106+
</details>
107+
108+
## Логи
109+
110+
<!--
111+
Установите GPT2GIGA_LOG_LEVEL=DEBUG и приложите релевантные логи.
112+
Удалите любую чувствительную информацию!
113+
-->
114+
115+
<details>
116+
<summary>Логи gpt2giga (уровень DEBUG)</summary>
117+
118+
```
119+
Вставьте сюда релевантные логи
120+
```
121+
122+
</details>
123+
124+
## Конфигурация
125+
126+
<!-- Приведите содержимое вашего .env файла (удалите чувствительные значения!) -->
127+
128+
<details>
129+
<summary>Конфигурация .env</summary>
130+
131+
```dotenv
132+
GPT2GIGA_HOST=localhost
133+
GPT2GIGA_PORT=8090
134+
GPT2GIGA_LOG_LEVEL=DEBUG
135+
# ... другие настройки
136+
```
137+
138+
</details>
139+
140+
## Дополнительный контекст
141+
142+
<!-- Добавьте сюда любой дополнительный контекст по проблеме -->
143+
144+
## Возможное решение
145+
146+
<!-- Необязательно: если у вас есть идеи по исправлению, опишите их здесь -->

0 commit comments

Comments
 (0)