isReasoningModel() kannte nur gpt-5. gpt-6-luna bekam deshalb
temperature 0.1 und OpenAI lehnte jeden Aufruf mit 400 ab ("Only the
default (1) value is supported"). Jetzt zaehlt jede Generation ab 5.
Vergleich gpt-4o-mini gegen gpt-6-luna in docs/14-ki.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
/*
|
|
* Prueft die Modellwahl, soweit es ohne Datenbank und OpenAI geht: welche
|
|
* Namen angenommen werden und welche Modelle als Reasoning-Modell gelten
|
|
* (die bekommen reasoning_effort statt temperature).
|
|
*/
|
|
const { AI_PURPOSES, isReasoningModel, isValidModel } = await import('../src/ai.js');
|
|
|
|
let failures = 0;
|
|
|
|
function check(name, condition) {
|
|
if (condition) {
|
|
console.log(` ok ${name}`);
|
|
} else {
|
|
failures += 1;
|
|
console.log(` FAIL ${name}`);
|
|
}
|
|
}
|
|
|
|
console.log('KI-Einstellungen');
|
|
|
|
check('Vorgabe Bewertung ist gpt-4o-mini', AI_PURPOSES.matching.fallback === 'gpt-4o-mini');
|
|
check('Vorgabe Abgleich ist gpt-5.6-luna', AI_PURPOSES.applied.fallback === 'gpt-5.6-luna');
|
|
|
|
for (const name of ['gpt-4o-mini', 'gpt-5.6-luna', 'o4-mini', 'gpt-4o-2024-08-06', 'ft:gpt-4o-mini:perinco:x:1']) {
|
|
check(`gueltig: ${name}`, isValidModel(name));
|
|
}
|
|
for (const name of ['', ' gpt-4o', 'gpt 4o', 'gpt-4o;drop', 'x'.repeat(101), null]) {
|
|
check(`ungueltig: ${JSON.stringify(name)?.slice(0, 20)}`, !isValidModel(name));
|
|
}
|
|
|
|
for (const name of ['o1', 'o3-mini', 'o4-mini', 'gpt-5', 'gpt-5.6-luna', 'gpt-6-luna', 'gpt-6-sol', 'gpt-10']) {
|
|
check(`reasoning: ${name}`, isReasoningModel(name));
|
|
}
|
|
for (const name of ['gpt-4o-mini', 'gpt-4.1', 'chatgpt-4o-latest']) {
|
|
check(`klassisch: ${name}`, !isReasoningModel(name));
|
|
}
|
|
|
|
if (failures) {
|
|
console.log(`\n${failures} Pruefung(en) fehlgeschlagen.`);
|
|
process.exit(1);
|
|
}
|
|
console.log('\nAlles gruen.');
|
|
process.exit(0);
|