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
16 changes: 14 additions & 2 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3266,8 +3266,20 @@ def consolidate_chunks(self):
self.partial_response_reasoning_content = reasoning_content or ""

try:
if not self.partial_response_reasoning_content:
self.partial_response_content = response.choices[0].message.content or ""
content = response.choices[0].message.content
if isinstance(content, list):
# OpenAI-compatible APIs sometimes return content as a list
# of blocks; join the textual pieces for display.
content = "".join(
block.get("text", "")
for block in content
if isinstance(block, dict) and block.get("type") == "output_text"
) or "".join(
block.get("text", "")
for block in content
if isinstance(block, dict) and block.get("type") == "text"
)
self.partial_response_content = content or ""
except AttributeError as e:
content_err = e

Expand Down
5 changes: 1 addition & 4 deletions aider/commands/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ async def execute(cls, io, coder, args, **kwargs):
@classmethod
def get_completions(cls, io, coder, args) -> List[str]:
"""Get completion options for model command."""
from aider.llm import litellm

model_names = litellm.model_cost.keys()
return list(model_names)
return models.get_chat_model_names()

@classmethod
def get_help(cls) -> str:
Expand Down
5 changes: 1 addition & 4 deletions aider/commands/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ async def execute(cls, io, coder, args, **kwargs):
@classmethod
def get_completions(cls, io, coder, args) -> List[str]:
"""Get completion options for models command."""
from aider.llm import litellm

model_names = litellm.model_cost.keys()
return list(model_names)
return models.get_chat_model_names()

@classmethod
def get_help(cls) -> str:
Expand Down
Loading
Loading