feat: initial release of q38max gateway

This commit is contained in:
Luxferre
2026-08-27 13:54:10 +03:00
commit d68efdbf59
7 changed files with 2028 additions and 0 deletions
Executable
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
set -e
PORT=${1:-18080}
BASE_URL="http://localhost:${PORT}"
echo "=== 1. Testing Models Endpoint ==="
curl -s "${BASE_URL}/v1/models" | jq .
echo ""
echo "=== 2. Testing Non-Streaming Chat Completion ==="
curl -s -X POST "${BASE_URL}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-3.8-max",
"messages": [
{"role": "user", "content": "What is the capital of Italy? Answer in 1 word."}
],
"reasoning_effort": "none",
"max_tokens": 50
}' | jq .
echo ""
echo "=== 3. Testing Streaming SSE Completion (with reasoning) ==="
curl -N -s -X POST "${BASE_URL}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-3.8-max",
"messages": [
{"role": "user", "content": "Calculate 25 * 25 and explain briefly in one sentence."}
],
"stream": true,
"reasoning_effort": "medium",
"max_tokens": 150
}'
echo ""
echo "=== 4. Testing Function/Tool Calling ==="
curl -s -X POST "${BASE_URL}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-3.8-max",
"messages": [
{"role": "user", "content": "What is the weather in Berlin?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}
],
"reasoning_effort": "none",
"max_tokens": 200
}' | jq .
echo ""
echo "=== All integration tests finished successfully! ==="