okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
061a28583
main
1"""DeepSeek-V4.1-Flash's model id has dots ("deepseek-v4.1-flash-ist-das-2.00bpw"). The app lists installed models through Control, which 2used to drop any id with a dot: the install finished and the model never appeared.""" 3import json 4import tempfile 5import unittest 6from pathlib import Path 7 8from strata_control import models 9 10 11class DotInModelId (unittest .TestCase ): 12def test_ids_with_a_dot_are_accepted_and_odd_ones_are_not (self ): 13for good in ("deepseek-v4.1-flash-ist-das-2.00bpw" ,"q2_0" ,"qwen36-ud-q4_k_xl" ): 14self .assertTrue (models .MODEL_ID .fullmatch (good ),good ) 15for bad in ("a..b" ,".a" ,"../x" ,"a/b" ,"A" ): 16self .assertFalse (models .MODEL_ID .fullmatch (bad ),bad ) 17 18def test_a_run_config_with_a_dotted_name_is_listed (self ): 19with tempfile .TemporaryDirectory ()as tmp : 20folder = Path (tmp ) 21 (folder / "strata-deepseek-v4.1-flash-ist-das-2.00bpw.json" ).write_text (json .dumps ( 22 {"exe" :"/x/strata-dsv41" ,"tokenizer" :str (folder ),"args" : ["--max-context" ,"8192" ],"model_name" :"deepseek-v4.1-flash" })) 23listed = models .list_installed (str (folder )) 24self .assertEqual ([m ["id" ]for m in listed ["models" ]], ["deepseek-v4.1-flash-ist-das-2.00bpw" ]) 25 26 27if __name__ == "__main__" : 28unittest .main ()