CodeBench: qwen3:8b primary-rooliin, FK-esimerkit code-small promptissa

profiles.json: role-kenttä (primary/backup/minimal/retired).
code-small.md: lisätty konkreettinen FK-pattern ja testi-esimerkki
relaatioille — 8b:n blog-skenaario kaatui koska ei osannut FK:ta.
This commit is contained in:
2026-04-14 13:55:40 +03:00
parent 92964e322f
commit 7fe72480b1
2 changed files with 45 additions and 7 deletions

View File

@@ -2,33 +2,43 @@
"models": {
"qwen3-coder:30b": {
"profile": "large",
"role": "primary",
"prompt": "code",
"golden": "todo.md",
"vram": "24GB",
"notes": "Pääkooderi. 97p, 188 tok/s. Noudattaa pitkiä sääntölistoja."
},
"qwen3:8b": {
"profile": "small",
"role": "primary",
"prompt": "code-small",
"golden": "todo.md",
"notes": "Kevyt vaihtoehto. Todo/users 100p, blog heikko. Lyhyt prompti toimii paremmin."
},
"qwen3:14b": {
"profile": "large",
"prompt": "code",
"golden": "todo.md",
"notes": "Poistettu käytöstä. Ei lisäarvoa 30b:hen verrattuna."
"vram": "8GB",
"notes": "Kevyt pääkooderi. Todo/users 100p, blog heikko. Lyhyt prompti toimii paremmin."
},
"codestral:22b": {
"profile": "large",
"role": "backup",
"prompt": "code",
"golden": "todo.md",
"vram": "16GB",
"notes": "Mistral-varamalli. 88p, 44 tok/s."
},
"qwen3:4b": {
"profile": "small",
"role": "minimal",
"prompt": "code-small",
"golden": "todo.md",
"vram": "4GB",
"notes": "Minimaali. Vain todo toimii."
},
"qwen3:14b": {
"profile": "large",
"role": "retired",
"prompt": "code",
"golden": "todo.md",
"vram": "16GB",
"notes": "Poistettu. Ei lisäarvoa 30b:hen verrattuna, blog epävakaa."
}
},
"profiles": {

View File

@@ -15,6 +15,34 @@ Key patterns (copy from reference):
- model_dump() not dict()
- POST 201, GET list, GET by id 404, PUT, DELETE 204
FOREIGN KEYS (when spec has relationships):
- Child entity gets parent_id field: Mapped[int] = mapped_column(ForeignKey("parents.id"))
- Import ForeignKey: from sqlalchemy import ForeignKey
- Create schema includes parent_id: int
- Test creates parent FIRST, then child with parent's id
Example FK pattern in models.py:
```
class Author(Base):
__tablename__ = "authors"
id: Mapped[int] = mapped_column(primary_key=True, index=True)
name: Mapped[str] = mapped_column(String(255))
class Post(Base):
__tablename__ = "posts"
id: Mapped[int] = mapped_column(primary_key=True, index=True)
title: Mapped[str] = mapped_column(String(255))
author_id: Mapped[int] = mapped_column(ForeignKey("authors.id"))
```
Example FK test pattern:
```
def test_create_post():
author = client.post("/authors/", json={"name": "Kirjailija"}).json()
response = client.post("/posts/", json={"title": "Artikkeli", "author_id": author["id"]})
assert response.status_code == 201
```
CRITICAL:
- Use ONLY fields from the JSON spec — no created_at or extra fields
- Generate EXACTLY 6 tests per entity: create, list, get_by_id, not_found, update, delete