def test_ai_config_from_dict_defaults():
    from inference import ai_config_from_dict

    cfg = ai_config_from_dict({})
    assert cfg.model_batch_size == 8
    assert cfg.frame_period_recognition == 4
    assert cfg.frame_recognition_seconds == 2


def test_ai_config_from_dict_overrides():
    from inference import ai_config_from_dict

    cfg = ai_config_from_dict({"model_batch_size": 4, "probability_threshold": 0.5})
    assert cfg.model_batch_size == 4
    assert cfg.probability_threshold == 0.5
