fix(wp7-02): replace preview Gemini routes
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s
This commit is contained in:
@@ -1,25 +1,16 @@
|
|||||||
{
|
{
|
||||||
"config_set_version": 4,
|
"config_set_version": 8,
|
||||||
"gateway_account_ref": "oneapi-intelligrow-test",
|
"gateway_account_ref": "oneapi-intelligrow-test",
|
||||||
"models": [
|
"models": [
|
||||||
{
|
{
|
||||||
"config_version": 3,
|
"config_version": 7,
|
||||||
"gateway_account_ref": "oneapi-intelligrow-test",
|
"gateway_account_ref": "oneapi-intelligrow-test",
|
||||||
"model_id": "gemini-3.1-flash-image-preview",
|
"model_id": "gemini-3.1-flash-image",
|
||||||
"route_profile": {
|
"route_profile": {
|
||||||
"endpoint": "https://oneapi.intelligrow.cn/v1beta/models/gemini-3.1-flash-image-preview:generateContent",
|
"endpoint": "https://oneapi.intelligrow.cn/v1/chat/completions",
|
||||||
"mode": "sync",
|
"mode": "sync",
|
||||||
"protocol_version": "gemini-native-v1beta"
|
"protocol_version": "gemini-openai-chat-v1",
|
||||||
}
|
"provider_model_id": "gemini-3.1-flash-image"
|
||||||
},
|
|
||||||
{
|
|
||||||
"config_version": 3,
|
|
||||||
"gateway_account_ref": "oneapi-intelligrow-test",
|
|
||||||
"model_id": "gemini-3-pro-image-preview",
|
|
||||||
"route_profile": {
|
|
||||||
"endpoint": "https://oneapi.intelligrow.cn/v1beta/models/gemini-3-pro-image-preview:generateContent",
|
|
||||||
"mode": "sync",
|
|
||||||
"protocol_version": "gemini-native-v1beta"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import { resolve } from "node:path";
|
|||||||
|
|
||||||
export const AI_GATEWAY_CREDENTIAL_TARGET = "Dada/P0A/worker/ai-gateway";
|
export const AI_GATEWAY_CREDENTIAL_TARGET = "Dada/P0A/worker/ai-gateway";
|
||||||
export const WP7_02_MODEL_IDS = Object.freeze([
|
export const WP7_02_MODEL_IDS = Object.freeze([
|
||||||
"gemini-3.1-flash-image-preview",
|
"gemini-3.1-flash-image",
|
||||||
"gemini-3-pro-image-preview",
|
|
||||||
"gpt-image-2",
|
"gpt-image-2",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -195,7 +194,7 @@ export function buildBlockedModelEvidence({ blockers, candidateRecord, modelId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function validateIndependentEvidenceSet(evidence) {
|
export function validateIndependentEvidenceSet(evidence) {
|
||||||
if (!Array.isArray(evidence) || evidence.length !== WP7_02_MODEL_IDS.length) throw new Error("WP7_02_THREE_MODEL_EVIDENCE_REQUIRED");
|
if (!Array.isArray(evidence) || evidence.length !== WP7_02_MODEL_IDS.length) throw new Error("WP7_02_MODEL_EVIDENCE_SET_REQUIRED");
|
||||||
const ids = evidence.map((entry) => entry.model_id).toSorted();
|
const ids = evidence.map((entry) => entry.model_id).toSorted();
|
||||||
if (JSON.stringify(ids) !== JSON.stringify([...WP7_02_MODEL_IDS].toSorted())) throw new Error("WP7_02_MODEL_EVIDENCE_SET_INVALID");
|
if (JSON.stringify(ids) !== JSON.stringify([...WP7_02_MODEL_IDS].toSorted())) throw new Error("WP7_02_MODEL_EVIDENCE_SET_INVALID");
|
||||||
if (new Set(evidence.map((entry) => entry.evidence_id)).size !== evidence.length) throw new Error("WP7_02_SHARED_EVIDENCE_FORBIDDEN");
|
if (new Set(evidence.map((entry) => entry.evidence_id)).size !== evidence.length) throw new Error("WP7_02_SHARED_EVIDENCE_FORBIDDEN");
|
||||||
|
|||||||
Reference in New Issue
Block a user