mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-08 16:37:55 +08:00
config: rename the DeepSeek flash model to deepseek-flash
DeepSeek dropped the `v4` prefix from its flash model, and the old id stays valid only as a compatibility alias. Seed the default catalog with the current name so a provider that omits `models` no longer offers a deprecated id, and follow the rename in the wire fixtures and the minimal config template. An explicit `deepseek-v4-flash` in TOML still passes through unchanged.
This commit is contained in:
@@ -17,7 +17,7 @@ def _sample_message_body() -> bytes:
|
||||
return msgspec.json.encode(
|
||||
AnthropicMessageResponse(
|
||||
id="msg_1",
|
||||
model="deepseek-v4-flash",
|
||||
model="deepseek-flash",
|
||||
content=[AnthropicResponseText(text="hello world")],
|
||||
stop_reason="end_turn",
|
||||
usage=AnthropicUsage(input_tokens=9, output_tokens=3),
|
||||
@@ -52,7 +52,7 @@ async def test_client_messages_create(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
return _Resp()
|
||||
|
||||
monkeypatch.setattr(client.session, "post", fake_post)
|
||||
result = await client.messages(AnthropicMessagesParam(model="deepseek-v4-flash", messages=[]))
|
||||
result = await client.messages(AnthropicMessagesParam(model="deepseek-flash", messages=[]))
|
||||
assert isinstance(result, AnthropicMessageResponse)
|
||||
assert result.content[0].text == "hello world"
|
||||
assert result.usage.output_tokens == 3
|
||||
@@ -78,7 +78,7 @@ async def test_client_messages_stream(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
return _Resp()
|
||||
|
||||
monkeypatch.setattr(client.session, "post", fake_post)
|
||||
stream = await client.messages(AnthropicMessagesParam(model="deepseek-v4-flash", messages=[]), stream=True)
|
||||
stream = await client.messages(AnthropicMessagesParam(model="deepseek-flash", messages=[]), stream=True)
|
||||
events = [event async for event in stream]
|
||||
assert len(events) == 2
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from plyngent.lmproto.openai_compatible.config import OpenAIConfig
|
||||
|
||||
def _sample_response_body() -> bytes:
|
||||
return (
|
||||
b'{"id":"resp_1","object":"response","created_at":1,"model":"deepseek-v4-flash",'
|
||||
b'{"id":"resp_1","object":"response","created_at":1,"model":"deepseek-flash",'
|
||||
b'"status":"completed","output":['
|
||||
b'{"id":"msg_1","type":"message","role":"assistant","status":"completed",'
|
||||
b'"content":[{"type":"output_text","text":"hello from deepseek","annotations":[]}]}'
|
||||
@@ -40,7 +40,7 @@ async def test_client_responses_create(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
return _Resp()
|
||||
|
||||
monkeypatch.setattr(client.session, "post", fake_post)
|
||||
result = await client.responses(ResponsesCreateParam(model="deepseek-v4-flash", input="hi"))
|
||||
result = await client.responses(ResponsesCreateParam(model="deepseek-flash", input="hi"))
|
||||
assert isinstance(result, Response)
|
||||
assert response_output_text(result) == "hello from deepseek"
|
||||
|
||||
@@ -62,7 +62,7 @@ async def test_client_responses_stream_stops_at_terminal(monkeypatch: pytest.Mon
|
||||
yield (
|
||||
b'data: {"type":"response.completed","sequence_number":2,'
|
||||
b'"response":{"id":"resp_1","object":"response","created_at":1,'
|
||||
b'"model":"deepseek-v4-flash","status":"completed","output":[]}}'
|
||||
b'"model":"deepseek-flash","status":"completed","output":[]}}'
|
||||
)
|
||||
# Anything after the terminal event must not be consumed.
|
||||
yield b'data: {"type":"response.output_text.delta","delta":"ignored"}'
|
||||
@@ -77,7 +77,7 @@ async def test_client_responses_stream_stops_at_terminal(monkeypatch: pytest.Mon
|
||||
|
||||
monkeypatch.setattr(client.session, "post", fake_post)
|
||||
stream = await client.responses(
|
||||
ResponsesCreateParam(model="deepseek-v4-flash", input="hi"),
|
||||
ResponsesCreateParam(model="deepseek-flash", input="hi"),
|
||||
stream=True,
|
||||
)
|
||||
events = [event async for event in stream]
|
||||
|
||||
Reference in New Issue
Block a user