Add Promptkit definition conformance coverage

This commit is contained in:
2026-08-29 15:12:27 +00:00
parent 3e5f5c5198
commit 8936ca7c18
15 changed files with 434 additions and 0 deletions

12
testdata/promptkit-v0.9/config.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
prompt_dir: ./testdata/promptkit-v0.9/prompts
profile_dir: ./testdata/promptkit-v0.9/profiles
schema_dir: ./testdata/promptkit-v0.9/schemas
backends:
fixture-custom:
endpoint: http://127.0.0.1:11434/v1
api_key_env: FIXTURE_BACKEND_API_KEY
extra_params:
backend_option:
enabled: true
concurrency_limit: 2
queue_capacity: 0

View File

@@ -0,0 +1 @@
The fixture source contains stable, synthetic material.

View File

@@ -0,0 +1,16 @@
id: custom-base
backend: fixture-custom
model: fixture-base-model
temperature: 0.25
max_tokens: 640
top_p: 0.9
timeout_seconds: 45
service_tier: flex
reasoning_effort: medium
api_key_env: FIXTURE_PROFILE_API_KEY
extra_params:
routing:
order:
- primary
- fallback
allow_fallback: true

View File

@@ -0,0 +1,4 @@
id: custom-derived
base_profile: custom-base
model: fixture-derived-model
reasoning_effort: high

View File

@@ -0,0 +1,10 @@
id: endpoint-only
endpoint: http://127.0.0.1:8000/v1
model: fixture-endpoint-model
temperature: 0.1
max_tokens: 128
top_p: 0.75
timeout_seconds: 30
extra_params:
endpoint_option:
nested: true

View File

@@ -0,0 +1,31 @@
id: compat.complete
version: "1.0.0"
description: Exercise the complete Promptkit v0.9 prompt-definition surface.
default_profile: custom-derived
session_id: 'fixture-{{.topic}}'
inputs:
- name: source
required: true
content_type: text/markdown
description: Source material rendered by a file-backed message.
- name: context
required: false
content_type: text/plain
description: Optional caller context.
messages:
- role: developer
content: 'Use the topic {{.topic}}.'
cache_control:
type: ephemeral
ttl: 1h
- role: system
content_file: ./messages/complete.system.md
- role: user
content_file: ./messages/complete.user.md
- role: assistant
content: Return one JSON object.
output:
format: json
validation_mode: json_schema
schema_path: complete.schema.json
repair_attempts: 2

View File

@@ -0,0 +1,10 @@
id: compat.complete
version: "2.0.0"
default_profile: endpoint-only
messages:
- role: user
content: Version two has no declared inputs.
output:
format: text
validation_mode: basic
repair_attempts: 1

View File

@@ -0,0 +1,10 @@
id: compat.json
version: "1.0.0"
default_profile: endpoint-only
messages:
- role: user
content: Return JSON.
output:
format: json
validation_mode: json
repair_attempts: 0

View File

@@ -0,0 +1 @@
Use the supplied source without inventing details.

View File

@@ -0,0 +1,4 @@
Topic: {{.topic}}
Source:
{{input "source"}}

View File

@@ -0,0 +1,10 @@
id: compat.none
version: "1.0.0"
default_profile: endpoint-only
messages:
- role: user
content: Return text.
output:
format: text
validation_mode: none
repair_attempts: 0

View File

@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["summary"],
"properties": {
"summary": {
"type": "string"
}
},
"additionalProperties": false
}