Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4444,7 +4444,7 @@ def _prefer_detected_model(provider: str, models: list[str], manual_option: str)
provider_slug = provider_state_slug(provider)
choice_key = f"model_choice_{provider_slug}"
current_choice = st.session_state.get(choice_key)
if current_choice in models:
if current_choice == manual_option or current_choice in models:
return
preferred = str(
st.session_state.get(f"model_manual_{provider_slug}", "")
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-r requirements.txt
httpx>=0.28.1,<1.0.0
pytest>=9.1.1,<10.0
4 changes: 4 additions & 0 deletions tests/test_app_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def test_app_starts_without_contacting_a_model() -> None:
def test_chat_submission_is_preserved_without_a_selected_model() -> None:
app_path = Path(__file__).resolve().parents[1] / "app.py"
app = AppTest.from_file(str(app_path)).run(timeout=20)
model_choice = next(
item for item in app.selectbox if item.label == "已检测到的模型"
)
model_choice.set_value("手动输入…").run(timeout=20)
model = next(item for item in app.text_input if item.label == "Model Name")
model.set_value("").run(timeout=20)
question = next(item for item in app.text_area if item.label == "继续回复 JARVIS")
Expand Down