• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agentjido / req_llm / 59f7c6f6b50d40a11a5550aab27255b3024c7011
49%

Build:
DEFAULT BRANCH: main
Ran 14 Oct 2025 04:27PM UTC
Jobs 2
Files 69
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Oct 2025 04:26PM UTC coverage: 51.226% (-0.8%) from 52.002%
59f7c6f6b50d40a11a5550aab27255b3024c7011

push

github

web-flow
Refactor context and message handling for tool calls (#98)

* Refactor context and message handling for tool calls

- Updated `ReqLLM.Context` to replace `push_user`, `push_assistant`, and `push_system` with `append` and `prepend` methods for better clarity and consistency.
- Introduced `ReqLLM.ToolCall` struct to represent tool calls, aligning with OpenAI's API format.
- Modified message structures to utilize `tool_calls` instead of content parts for tool-related interactions.
- Enhanced encoding and decoding processes across providers to support the new tool call structure.
- Removed deprecated content part types related to tool calls and results, streamlining the message handling logic.
- Updated tests to reflect changes in tool call handling and ensure compatibility with existing functionality.

This refactor aims to improve the clarity and maintainability of the codebase while ensuring robust handling of tool calls in conversations.

* Add example scripts for context reuse, cross-model context, and reasoning tokens

- Introduced new example scripts demonstrating various functionalities of the ReqLLM library, including:
  - `context_reuse.exs`: Shows how the same context can be passed between different API functions without modifications.
  - `context_cross_model.exs`: Demonstrates context reuse across different models and providers.
  - `reasoning_tokens.exs`: Illustrates reasoning token usage with models that support extended thinking.
  - `run_all.sh`: A script to run all example scripts sequentially for demonstration purposes.

- Updated README.md to include usage instructions and examples for the new scripts, enhancing documentation and usability for users.

This commit aims to enrich the library's examples and improve user experience by providing runnable scripts for various functionalities.

* Enhance context and tool call handling in ReqLLM

- Updated `ReqLLM.Context` to improve the handling of assistant messages with tool calls, ensuring ... (continued)

110 of 305 new or added lines in 20 files covered. (36.07%)

11 existing lines in 5 files now uncovered.

2799 of 5464 relevant lines covered (51.23%)

180.52 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% lib/examples/agent.ex
4
50.99
0.0% lib/req_llm/providers/anthropic.ex
5
45.22
1.53% lib/req_llm/providers/groq.ex
5
81.32
-1.83% lib/req_llm/providers/xai.ex
5
28.57
lib/req_llm/tool_call.ex
6
32.43
2.13% lib/req_llm/providers/anthropic/response.ex
6
76.82
-1.17% lib/req_llm/stream_server.ex
8
0.0
0.0% test/support/helpers.ex
10
61.51
-0.25% lib/req_llm/provider/defaults.ex
11
64.09
-0.16% lib/req_llm/providers/openai/responses_api.ex
14
40.0
-25.0% lib/req_llm/providers/anthropic/context.ex
15
66.67
-9.68% lib/req_llm/providers/openai/chat_api.ex
18
0.0
0.0% lib/req_llm/providers/cerebras.ex
23
0.0
0.0% lib/examples/scripts/helpers.ex
24
54.33
-2.2% lib/req_llm/providers/google.ex
40
68.06
-11.59% lib/req_llm/context.ex

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% lib/examples/scripts/helpers.ex
1
72.41
-3.45% lib/req_llm/providers/openai/param_profiles.ex
2
40.0
-25.0% lib/req_llm/providers/anthropic/context.ex
3
68.06
-11.59% lib/req_llm/context.ex
4
45.45
-5.19% lib/req_llm/response.ex
Jobs
ID Job ID Ran Files Coverage
1 59f7c6f6b50d40a11a5550aab27255b3024c7011.1 14 Oct 2025 04:27PM UTC 69
51.22
GitHub Action Run
2 59f7c6f6b50d40a11a5550aab27255b3024c7011.2 14 Oct 2025 04:27PM UTC 69
51.04
GitHub Action Run
Source Files on build 59f7c6f6b50d40a11a5550aab27255b3024c7011
  • Tree
  • List 69
  • Changed 23
  • Source Changed 0
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 59f7c6f6 on github
  • Prev Build on main (#238938F5...)
  • Next Build on main (#0DA6303E...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc