Skip to content

Conversation

@nicovank
Copy link
Collaborator

@nicovank nicovank commented May 2, 2025

This will make usage easier.
Updates to instructions to follow.

Just making this PR for myself, I like GHs diff interface. You're welcome to check it out but review is not necessary.

if model in litellm.model_data:
max_tokens_for_model = litellm.model_data[model]["max_input_tokens"]
else:
# Arbitrary. This is Llama 3.1/3.2/3.3 max input tokens.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: this may not be ideal. Check if model is a substring of any models in model_data?

This will usage easier.

Updates to instructions to follow.
@tawsifazad23
Copy link
Contributor

Tested pr63 locally: help/usage OK; boom.py repro + why works; tool calls stream correctly; no LiteLLM runtime dependency observed.
Suggestion: src/chatdbg/util/litellm.py currently fetches model info over HTTP at import—wrap in try/except and ship a tiny built-in default so it’s robust offline; if the fetch fails, use fallback and optionally hide/zero the cost line. I can push a follow-up commit if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants