def test_app_exposes_all_legacy_and_openai_routes():
    from surya.endpoint.app import app

    paths = {getattr(r, "path", None) for r in app.routes}
    expected = {
        "/home",
        "/v1/api/ai/suya_ocr",
        "/v1/api/ai/suya_ocr/",
        "/v1/api/ai/suya_ocr_vllm",
        "/v1/api/ai/suya_ocr_vllm/",
        "/v1/api/ai/suya_ocr_vllm/health",
        "/v1/api/ai/suya_text_det",
        "/v1/api/ai/suya_text_det/",
        "/v1/api/ai/suya_layout_det",
        "/v1/api/ai/suya_layout_det/",
        "/v1/api/ai/suya_table_rec",
        "/v1/api/ai/suya_table_rec/",
        "/image2text",
        "/v1/chat/completions",
    }
    assert expected.issubset(paths), f"missing routes: {expected - paths}"
