SPB Git

Repository Public

NextGenFixtures.swift 16.9 KB 21 lines swift

1//2//  SP Chat iOS3//  File: SPChat-iOS/Tests/NextGenFixtures.swift4//  Description: Real payload shapes of backend 1.0 (captured from the development server, trimmed) used by the unit tests.5//6//  Author: Simon-Pierre Boucher7//  Contact: contact@spboucher.ai8//910import Foundation1112enum NextGenFixtures {13    /// `GET /api/models?routes=all`: one direct model, three OpenRouter models, one entry without id and one from the future.14    static let catalog = ##"{"models":[{"id":"claude-haiku-5-5","provider":"anthropic","displayName":"Claude Haiku 5.5","kind":"chat","api":null,"status":"verified","available":true,"tested":true,"unavailableReason":null,"capabilities":{"text":true,"tools":true,"vision":true,"reasoning":true,"streaming":true,"audioInput":false,"audioOutput":false,"longContext":true,"imageGeneration":false,"reasoningNative":true,"structuredOutput":true},"contextWindow":1000000,"maxOutputTokens":128000,"pricing":{"input":0.1,"notes":"prompts >100K tokens: $0.50/$2.50","output":0.5,"cachedInput":0.01,"cacheWrite1h":0.2,"cacheWrite5m":0.125},"benchmark":{"tests":11,"errors":[],"passed":11,"p50TtftMs":637,"p50LatencyMs":883,"qualityScore":100,"totalCostUsd":0.0021742000000000003,"avgOutputTokens":103},"hidden":false,"favorite":false,"lastVerifiedAt":"2026-11-01T07:18:11.433Z","route":"direct","creator":"anthropic","creatorName":"Anthropic","logo":"anthropic","description":null,"catalog":null,"categories":["reasoning","vision","long-context","tools","fast"],"lastUsedAt":"2026-11-18T04:06:02.324Z"},{"id":"or:google/gemini-4-neon","provider":"openrouter","displayName":"Gemini 4 Neon","kind":"chat","api":"chat","status":"catalog","available":true,"tested":false,"unavailableReason":null,"capabilities":{"text":true,"tools":true,"vision":true,"reasoning":true,"streaming":true,"audioInput":true,"audioOutput":false,"longContext":true,"effortLevels":["xhigh","high","medium","low"],"imageGeneration":false,"structuredOutput":true},"contextWindow":1048576,"maxOutputTokens":943718,"pricing":{"input":3,"notes":"Prix publié par le catalogue OpenRouter (USD par million de jetons).","output":15,"cachedInput":0.15},"benchmark":null,"hidden":false,"favorite":false,"lastVerifiedAt":null,"route":"openrouter","creator":"google","creatorName":"Google","logo":"google","description":"Gemini 4 Neon is a fast, mid-priced model in the G","catalog":{"slug":"google/gemini-4-neon","source":"openrouter","aliasOf":null,"created":1795006977,"rankedIn":[],"moderated":false,"reasoning":{"efforts":["xhigh","high","medium","low"],"mandatory":true,"defaultEffort":"medium"},"tokenizer":"Gemini","benchmarks":{"available":["artificial_analysis"]},"huggingFaceId":null,"expirationDate":null,"inputModalities":["audio","file","image","text","video"],"outputModalities":["text"],"supportedParameters":["include_reasoning","max_tokens","reasoning","reasoning_effort","response_format","seed","stop","structured_outputs","temperature","tool_choice","tools","top_p"]},"categories":["reasoning","vision","multimodal","long-context","tools"],"lastUsedAt":"2026-11-19T14:20:30.257Z"},{"id":"or:anthropic/claude-haiku-5.5","provider":"openrouter","displayName":"Claude Haiku 5.5","kind":"chat","api":"chat","status":"catalog","available":true,"tested":false,"unavailableReason":null,"capabilities":{"text":true,"tools":true,"vision":true,"reasoning":true,"streaming":true,"audioInput":false,"audioOutput":false,"longContext":true,"effortLevels":["xhigh","high","medium","low"],"imageGeneration":false,"structuredOutput":true},"contextWindow":1000000,"maxOutputTokens":128000,"pricing":{"input":0.09999999999999999,"notes":"Prix publié par le catalogue OpenRouter (USD par million de jetons).","tiers":[{"input":0.5,"output":2.5,"minPromptTokens":100000}],"output":0.5,"cachedInput":0.01},"benchmark":null,"hidden":false,"favorite":false,"lastVerifiedAt":null,"route":"openrouter","creator":"anthropic","creatorName":"Anthropic","logo":"anthropic","description":"Claude Haiku 5.5 is Anthropic's small, fast model ","catalog":{"slug":"anthropic/claude-haiku-5.5","source":"openrouter","aliasOf":null,"created":1791397883,"rankedIn":["academia"],"moderated":true,"reasoning":{"efforts":["max","xhigh","high","medium","low","none"],"mandatory":false,"defaultEffort":"medium"},"tokenizer":"Claude","benchmarks":{"available":["design_arena","artificial_analysis"]},"huggingFaceId":null,"expirationDate":null,"inputModalities":["text","image","file"],"outputModalities":["text"],"supportedParameters":["include_reasoning","max_completion_tokens","max_tokens","reasoning","reasoning_effort","response_format","stop","structured_outputs","tool_choice","tools","verbosity"]},"categories":["reasoning","vision","long-context","tools","research"],"lastUsedAt":null},{"id":"or:inclusionai/ling-3.2-flash:free","provider":"openrouter","displayName":"Ling 3.2 Flash (free)","kind":"chat","api":"chat","status":"catalog","available":true,"tested":false,"unavailableReason":null,"capabilities":{"text":true,"tools":true,"vision":true,"reasoning":true,"streaming":true,"audioInput":false,"audioOutput":false,"longContext":true,"effortLevels":["low","medium","high"],"imageGeneration":false,"structuredOutput":true},"contextWindow":1048576,"maxOutputTokens":262144,"pricing":{"input":0,"notes":"Prix publié par le catalogue OpenRouter (USD par million de jetons).","output":0},"benchmark":null,"hidden":false,"favorite":false,"lastVerifiedAt":null,"route":"openrouter","creator":"inclusionai","creatorName":"Inclusionai","logo":null,"description":"Ling 3.2 Flash is a hybrid reasoning model from in","catalog":{"slug":"inclusionai/ling-3.2-flash:free","source":"openrouter","aliasOf":null,"created":1794591958,"rankedIn":[],"moderated":false,"reasoning":{"mandatory":false,"defaultEffort":null},"tokenizer":"Other","benchmarks":null,"huggingFaceId":"inclusionAI/Ling-3.2-flash","expirationDate":null,"inputModalities":["text","image"],"outputModalities":["text"],"supportedParameters":["frequency_penalty","include_reasoning","max_tokens","presence_penalty","reasoning","response_format","seed","stop","structured_outputs","temperature","tool_choice","tools","top_k","top_p"]},"categories":["reasoning","vision","long-context","open-weight","free","tools"],"lastUsedAt":null},{"id":"or:inclusionai/ling-3.2-flash:free","provider":"openrouter","displayName":"Ling 3.2 Flash (free)","kind":"chat","api":"chat","status":"catalog","available":true,"tested":false,"unavailableReason":null,"capabilities":{"text":true,"tools":true,"vision":true,"reasoning":true,"streaming":true,"audioInput":false,"audioOutput":false,"longContext":true,"effortLevels":["low","medium","high"],"imageGeneration":false,"structuredOutput":true},"contextWindow":1048576,"maxOutputTokens":262144,"pricing":{"input":0,"notes":"Prix publié par le catalogue OpenRouter (USD par million de jetons).","output":0},"benchmark":null,"hidden":false,"favorite":false,"lastVerifiedAt":null,"route":"openrouter","creator":"inclusionai","creatorName":"Inclusionai","logo":null,"description":"Ling 3.2 Flash is a hybrid reasoning model from in","catalog":{"slug":"inclusionai/ling-3.2-flash:free","source":"openrouter","aliasOf":null,"created":1794591958,"rankedIn":[],"moderated":false,"reasoning":{"mandatory":false,"defaultEffort":null},"tokenizer":"Other","benchmarks":null,"huggingFaceId":"inclusionAI/Ling-3.2-flash","expirationDate":null,"inputModalities":["text","image"],"outputModalities":["text"],"supportedParameters":["frequency_penalty","include_reasoning","max_tokens","presence_penalty","reasoning","response_format","seed","stop","structured_outputs","temperature","tool_choice","tools","top_k","top_p"]},"categories":["reasoning","vision","long-context","open-weight","free","tools"],"lastUsedAt":null},{"displayName":"sans identifiant"},{"id":"or:newvendor/future-1","provider":"quantum","displayName":"Future 1","kind":"chat","status":"experimental","available":true,"capabilities":{"vision":"unknown"},"route":"hyperloop","creator":"newvendor","creatorName":"New Vendor","logo":null,"categories":["telepathy"],"hidden":false,"favorite":false}],"defaultModel":"claude-opus-5-5","dock":["claude-haiku-5-5","or:google/gemini-4-neon"],"registry":{},"openrouter":{"configured":true,"catalog":{"chat":444,"total":444,"syncedAt":"2026-11-19T14:19:12.804Z"}}}"##15    static let catalogIds = ["claude-haiku-5-5", "or:google/gemini-4-neon", "or:anthropic/claude-haiku-5.5", "or:inclusionai/ling-3.2-flash:free", "or:inclusionai/ling-3.2-flash:free"]16    static let modelDetail = ##"{"model":{"id":"or:google/gemini-4-neon","provider":"openrouter","displayName":"Gemini 4 Neon","kind":"chat","api":"chat","status":"catalog","available":true,"tested":false,"unavailableReason":null,"capabilities":{"text":true,"tools":true,"vision":true,"reasoning":true,"streaming":true,"audioInput":true,"audioOutput":false,"longContext":true,"effortLevels":["xhigh","high","medium","low"],"imageGeneration":false,"structuredOutput":true},"contextWindow":1048576,"maxOutputTokens":943718,"pricing":{"input":3,"notes":"Prix publié par le catalogue OpenRouter (USD par million de jetons).","output":15,"cachedInput":0.15},"benchmark":null,"hidden":false,"favorite":false,"lastVerifiedAt":null,"route":"openrouter","creator":"google","creatorName":"Google","logo":"google","description":"Gemini 4 Neon is a fast, mid-priced model in the Gemini 4 fa","catalog":{"slug":"google/gemini-4-neon","prices":{"audio":3e-06,"image":3e-06,"web_search":0.014,"input_audio_cache":1.5e-07,"input_cache_write":8.33333333333333e-08,"internal_reasoning":1.5e-05},"source":"openrouter","aliasOf":null,"created":1795006977,"rankedIn":[],"moderated":false,"reasoning":{"efforts":["xhigh","high","medium","low"],"mandatory":true,"defaultEffort":"medium"},"tokenizer":"Gemini","benchmarks":{"artificial_analysis":{"legal_index":63.8,"economics_index":61.9,"engineering_index":66.8,"intelligence_index":61.4,"strategy_and_ops_index":63.8,"finance_and_accounting_index":65.1,"healthcare_and_medical_index":59.9}},"huggingFaceId":null,"expirationDate":null,"inputModalities":["audio","file","image","text","video"],"outputModalities":["text"],"supportedParameters":["include_reasoning","max_tokens","reasoning","reasoning_effort","response_format","seed","stop","structured_outputs","temperature","tool_choice","tools","top_p"]},"categories":["reasoning","vision","multimodal","long-context","tools"],"lastUsedAt":null},"params":{"effort":["xhigh","high","medium","low"],"effortAlias":{"max":"xhigh"},"temperature":true,"reasoningSummary":true,"notes":{}},"measured":{"source":"Mesuré sur ce compte (journal d'utilisation de SP Chat)","requests":1,"errors":0,"p50_latency_ms":10968,"p50_ttft_ms":10207,"cost_usd":0.019596,"input_tokens":4607,"output_tokens":385,"tokens_per_sec":35.10211524434719,"first_used":"2026-11-19T14:20:41.238Z","last_used":"2026-11-19T14:20:41.238Z"},"endpoints":{"source":"OpenRouter — points de terminaison en direct","list":[{"provider":"Google AI Studio","tag":"google-ai-studio/flex","contextLength":1048576,"maxCompletionTokens":943718,"quantization":"unknown","uptimeLast30m":100,"status":0,"inputPerM":1.5,"outputPerM":7.5,"supportsTools":true},{"provider":"Google AI Studio","tag":"google-ai-studio","contextLength":1048576,"maxCompletionTokens":65536,"quantization":"unknown","uptimeLast30m":88.46153846153845,"status":-2,"inputPerM":3,"outputPerM":15,"supportsTools":true},{"provider":"Google","tag":"google-vertex/global","contextLength":1048576,"maxCompletionTokens":943718,"quantization":"unknown","uptimeLast30m":100,"status":0,"inputPerM":3,"outputPerM":15,"supportsTools":true},{"provider":"Google","tag":"google-vertex/global/priority","contextLength":1048576,"maxCompletionTokens":943718,"quantization":"unknown","uptimeLast30m":100,"status":0,"inputPerM":5.4,"outputPerM":27,"supportsTools":true},{"provider":"Google AI Studio","tag":"google-ai-studio/priority","contextLength":1048576,"maxCompletionTokens":943718,"quantization":"unknown","uptimeLast30m":null,"status":0,"inputPerM":5.4,"outputPerM":27,"supportsTools":true}]},"twins":[]}"##17    static let providers = ##"{"providers":[{"id":"anthropic","name":"Anthropic","kind":"models","route":"direct","logo":"anthropic","configured":true,"keySource":"env","keyHint":"…t3st","manageable":false,"validatedAt":null,"info":null,"models":{"total":15,"chat":14},"health":{"state":"ok","recentFailures":0,"retryInSec":0,"active":0}},{"id":"openrouter","name":"OpenRouter","kind":"models","route":"openrouter","logo":"openrouter","configured":true,"keySource":"env","keyHint":"…t3st","manageable":true,"validatedAt":null,"info":null,"models":{"total":444,"chat":444},"catalog":{"chat":444,"added":444,"total":444,"removed":0,"syncedAt":"2026-11-19T14:19:12.804Z"},"health":null},{"id":"tavily","name":"Tavily","kind":"tool","route":null,"logo":"tavily","configured":true,"keySource":"env","keyHint":"…t3st","manageable":true,"validatedAt":null,"info":null}],"logos":{},"categoryRules":{"reasoning":"Le modèle expose un raisonnement réglable (capacité vérifiée ou paramètre « reasoning » du catalogue).","vision":"Accepte des images en entrée."}}"##18    /// An assistant message answered by an `or:` model with a web search (tool call, citations — one duplicated —, follow-ups, billed cost).19    static let citedMessage = ##"{"id":"msg_in8im8ls4qszlpnb","conversation_id":"conv_73bmktxa0xnzxykm","parent_id":"msg_o0u7ttdeivjwim49","role":"assistant","parts":[{"id":"call_16299893259840983300","name":"web_search","type":"tool_call","input":{"query":"PostgreSQL latest stable release version 2026","include_domains":["postgresql.org"]},"output":{"query":"q","results":[]},"status":"ok","durationMs":3178,"providerMeta":[{"id":"call_16299893259840983300","data":"AY89a1//C5YRO8veJGTF5fH+S2685A/teWsKFeub3bLsLjg9DAWnN7HUTjGRdGOvtmOZBWJdzDBzePeTsyQwjWP7yZ781tlGlYibcMjlyPq79pZzKyLoUkpNfxg5fXTGAlb3JwA2mMqR06m/o88cyxFpRLorBW8+I1b9HUl/0BNvsdPakkFFwmBoJvuM32KVmVMJbB3oRaYAnQi79daihQSZG3WhWGaTcNqoucDfntB6/lOC4Me9DFHZEVQfyc+3GNWtZBIV3eiGXo3wHiYS3aBCE9oeerWBh5QxxAP+tyFRiPDjbEf1Ube2neQiDkHdrYPcpWKxriRD/HeE6aauyKAa+WBmSGArpRUZjDHCFFsa03DUDICV48Od6WKtOHoJuP6jL8VgqNSNwsAtzNOMLU88htIQVbFFSWHl3IQYRtOhQybyu/QMFpXjHxxlidyXah25BxRxtiAsWDn2yJQwbsV9T/Ij/1lbNq0JtDCUREy+jnlIcJSjwdIF1R4wOiRc/TnyyE1dCXpVi2PitmGbNye1dv62.eyJlbmRwb2ludF9zbHVnIjoiZ29vZ2xlL2dlbWluaS00LW5lb24tMjAyNjExMTh8Z29vZ2xlLXZlcnRleC9nbG9iYWwifQ","type":"reasoning.encrypted","index":0,"format":"google-gemini-v1"}]},{"url":"https://www.postgresql.org","type":"citation","title":"PostgreSQL","snippet":"There is a wealth of information to be f"},{"url":"https://www.postgresql.org/docs/release","type":"citation","title":"PostgreSQL: Release Notes","snippet":"Image 1: PostgreSQL Elephant Logo- [x] \n"},{"url":"https://www.postgresql.org/docs/release/18.6","type":"citation","title":"PostgreSQL: Release Notes","snippet":"Image 1: PostgreSQL Elephant Logo- [x] \n"},{"url":"https://www.postgresql.org/support/versioning","type":"citation","title":"PostgreSQL: Versioning Policy","snippet":"Image 1: PostgreSQL Elephant Logo- [x] \n"},{"url":"https://www.postgresql.org/about/news/postgresql-187-1712-1616-1520-1425-and-19-rc-2-released-3442","type":"citation","title":"PostgreSQL: PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25, and 19 RC 2 Released!","snippet":"Image 1: PostgreSQL Elephant Logo- [x] \n"},{"url":"https://www.postgresql.org/download","type":"citation","title":"PostgreSQL: Downloads","snippet":"Image 1: PostgreSQL Elephant Logo- [x] \n"},{"text":"**Identifying Latest Release**\n\nI've confirmed the latest stable PostgreSQL release. It's version 18.7, with several other versions also seeing updates on November 12, 2026. Release candidates are noted but not considered the final stable version.\n\n","type":"reasoning","summarized":true},{"text":"La dernière version stable de PostgreSQL est la **18.7**, publiée le 12 novembre 2026 ([PostgreSQL.org](https://www.postgresql.org/about/news/postgresql-187-1712-1616-1520-1425-and-19-rc-2-released-3442)).","type":"text"},{"url":"https://www.postgresql.org","type":"citation","title":"PostgreSQL","snippet":"There is a wealth of information to be f"}],"text":"La dernière version stable de PostgreSQL est la **18.7**, publiée le 12 novembre 2026 ([PostgreSQL.org](https://www.postgresql.org/about/news/postgresql-187-1712-1616-1520-1425-and-19-rc-2-released-3442)).","model_id":"or:google/gemini-4-neon","provider":"openrouter","settings":{"effort":"low","applied":{"applied":{"tools":true,"effort":"low","webSearch":true},"ignored":[]},"presetId":null,"webSearch":true},"routing":{"mode":"manual","reason":"Modèle choisi explicitement.","selected":"or:google/gemini-4-neon","servedBy":"OpenRouter · Google"},"usage":{"input":4607,"cached":0,"output":385,"costUsd":0.019596000000000002,"reasoning":252},"cost_usd":0.019596,"latency_ms":10968,"ttft_ms":10207,"status":"complete","error":null,"active":true,"created_at":"2026-11-19T14:20:30.257Z","client_request_id":null,"error_code":null,"stop_reason":"end_turn","run_id":"run_16yzwh53ish4yf1p","followups":["Quelles sont les nouveautés de PostgreSQL 18 ?","Quand sortira la version PostgreSQL 19 ?","Comment mettre à jour PostgreSQL vers la version 18.7 ?"]}"##20}21
Files main
Menu

Theme