Repository: qualifire-dev/rogue
Issue: [Improvement] - Refactor Gradio UI's config with a pydantic model
GitHub labels: good first issue

In the gradio app, we use a plain dictionary as our config in the state, as can be seen [here](https://github.com/qualifire-dev/rogue-private/blob/8567820720c6509a59fc8c7540cbf5183fc249bb/rogue/ui/components/config_screen.py#L29): 

The config should be updated to a pydantic model, for better readability and reliability.


<details>
<summary>To find all the places we use the config, search for `config[\w_]*.get` under `rogue/ui/**/*.py`</summary>
Currently as of writing this issue, here are all the places:

```
33 results - 6 files

rogue/ui/app.py:
  113  
  114:             auth_type_val = config.get(
  115                  "evaluated_agent_auth_type",

  120                  agent_url: gr.update(
  121:                     value=config.get("evaluated_agent_url", "http://localhost:10001"),
  122                  ),
  123:                 interview_mode: gr.update(value=config.get("interview_mode", True)),
  124:                 deep_test_mode: gr.update(value=config.get("deep_test_mode", False)),
  125:                 parallel_runs: gr.update(value=config.get("parallel_runs", 1)),
  126                  auth_type: gr.update(value=auth_type_val),
  127                  auth_credentials: gr.update(
  128:                     value=config.get("evaluated_agent_credentials", ""),
  129                      visible=auth_type_val != AuthType.NO_AUTH.value,

  131                  service_llm: gr.update(
  132:                     value=config.get("service_llm", "openai/gpt-4.1"),
  133                  ),
  134:                 judge_llm: gr.update(value=config.get("judge_llm", "openai/o4-mini")),
  135:                 judge_llm_api_key: gr.update(value=config.get("judge_llm_api_key", "")),
  136                  # huggingface_api_key: gr.update(
  137:                 #     value=config.get("huggingface_api_key", "")
  138                  # ),

rogue/ui/components/config_screen.py:
   28              placeholder="http://localhost:8000",
   29:             value=config_data.get(
   30                  "evaluated_agent_url",

   38              label="Enable AI-powered business context interview",
   39:             value=config_data.get(
   40                  "interview_mode",

   51              label="Enable deep test mode.",
   52:             value=config_data.get("deep_test_mode", True),
   53          )

   64              step=1,
   65:             value=config_data.get("parallel_runs", 1),
   66          )

   71              choices=[e.value for e in AuthType],
   72:             value=config_data.get(
   73                  "evaluated_agent_auth_type",

   80              visible=(
   81:                 config_data.get("evaluated_agent_auth_type", AuthType.NO_AUTH.value)
   82                  != AuthType.NO_AUTH.value

  104              label="Service LLM",
  105:             value=config_data.get(
  106                  "service_llm",

  111              label="Judge LLM",
  112:             value=config_data.get(
  113                  "judge_llm",

  119              type="password",
  120:             value=config_data.get("judge_llm_api_key", ""),
  121          )

  129          #     type="password",
  130:         #     value=config_data.get(
  131          #         "huggingface_api_key",

rogue/ui/components/interviewer.py:
  37              config = state.get("config", {})
  38:             service_llm = config.get("service_llm", "openai/gpt-4.1")
  39:             api_key = config.get("judge_llm_api_key")
  40  

rogue/ui/components/report_generator.py:
  83                  structured_summary=state.get("structured_summary"),
  84:                 deep_test=config.get("deep_test_mode", False),
  85                  start_time=state.get("start_time"),
  86:                 judge_model=config.get("judge_llm"),
  87              )

rogue/ui/components/scenario_generator.py:
  40          config = state.get("config", {})
  41:         service_llm = config.get("service_llm")
  42:         api_key = config.get("judge_llm_api_key")
  43  

rogue/ui/components/scenario_runner.py:
  139          # 2. --- Setup Parallel Execution ---
  140:         parallel_runs = config.get("parallel_runs", 1)
  141          logger.info(f"Setting up {parallel_runs} parallel runs")

  172              worker_config = worker_state.get("config", {})
  173:             auth_type_val = worker_config.get("auth_type")
  174              if isinstance(auth_type_val, str):

  499                  results=all_results,
  500:                 model=config.get("service_llm"),
  501:                 api_key=config.get("judge_llm_api_key"),
  502:                 qualifire_api_key=config.get("qualifire_api_key"),
  503:                 deep_test=config.get("deep_test_mode", False),
  504:                 judge_model=config.get("judge_llm"),
  505              )

```
</details>