llm_gateway 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +544 -186
- data/Rakefile +1 -2
- data/docs/migration-guide.md +135 -0
- data/lib/llm_gateway/adapters/adapter.rb +173 -0
- data/lib/llm_gateway/adapters/anthropic/acts_like_messages.rb +23 -0
- data/lib/llm_gateway/adapters/{claude → anthropic}/bidirectional_message_mapper.rb +31 -3
- data/lib/llm_gateway/adapters/{claude → anthropic}/input_mapper.rb +4 -3
- data/lib/llm_gateway/adapters/anthropic/messages_adapter.rb +19 -0
- data/lib/llm_gateway/adapters/{claude → anthropic}/output_mapper.rb +1 -1
- data/lib/llm_gateway/adapters/anthropic/stream_mapper.rb +110 -0
- data/lib/llm_gateway/adapters/anthropic_option_mapper.rb +53 -0
- data/lib/llm_gateway/adapters/groq/chat_completions_adapter.rb +47 -0
- data/lib/llm_gateway/adapters/groq/option_mapper.rb +27 -0
- data/lib/llm_gateway/adapters/input_message_sanitizer.rb +93 -0
- data/lib/llm_gateway/adapters/openai/acts_like_chat_completions.rb +22 -0
- data/lib/llm_gateway/adapters/openai/acts_like_responses.rb +31 -0
- data/lib/llm_gateway/adapters/{open_ai → openai}/chat_completions/bidirectional_message_mapper.rb +9 -2
- data/lib/llm_gateway/adapters/{open_ai → openai}/chat_completions/input_mapper.rb +1 -6
- data/lib/llm_gateway/adapters/openai/chat_completions/input_message_sanitizer.rb +65 -0
- data/lib/llm_gateway/adapters/openai/chat_completions/option_mapper.rb +39 -0
- data/lib/llm_gateway/adapters/{open_ai → openai}/chat_completions/output_mapper.rb +1 -1
- data/lib/llm_gateway/adapters/openai/chat_completions/stream_mapper.rb +242 -0
- data/lib/llm_gateway/adapters/openai/chat_completions_adapter.rb +20 -0
- data/lib/llm_gateway/adapters/{open_ai → openai}/file_output_mapper.rb +1 -1
- data/lib/llm_gateway/adapters/openai/prompt_cache_option_mapper.rb +39 -0
- data/lib/llm_gateway/adapters/{open_ai → openai}/responses/bidirectional_message_mapper.rb +52 -4
- data/lib/llm_gateway/adapters/openai/responses/input_mapper.rb +106 -0
- data/lib/llm_gateway/adapters/openai/responses/option_mapper.rb +41 -0
- data/lib/llm_gateway/adapters/{open_ai → openai}/responses/output_mapper.rb +1 -1
- data/lib/llm_gateway/adapters/openai/responses/stream_mapper.rb +340 -0
- data/lib/llm_gateway/adapters/openai/responses_adapter.rb +20 -0
- data/lib/llm_gateway/adapters/openai_codex/input_mapper.rb +206 -0
- data/lib/llm_gateway/adapters/openai_codex/option_mapper.rb +28 -0
- data/lib/llm_gateway/adapters/openai_codex/responses_adapter.rb +38 -0
- data/lib/llm_gateway/adapters/option_mapper.rb +13 -0
- data/lib/llm_gateway/adapters/stream_accumulator.rb +91 -0
- data/lib/llm_gateway/adapters/structs.rb +145 -0
- data/lib/llm_gateway/base_client.rb +62 -1
- data/lib/llm_gateway/client.rb +45 -129
- data/lib/llm_gateway/clients/anthropic.rb +167 -0
- data/lib/llm_gateway/clients/claude_code/oauth_flow.rb +162 -0
- data/lib/llm_gateway/clients/claude_code/token_manager.rb +112 -0
- data/lib/llm_gateway/clients/groq.rb +54 -0
- data/lib/llm_gateway/clients/openai.rb +208 -0
- data/lib/llm_gateway/clients/openai_codex/oauth_flow.rb +258 -0
- data/lib/llm_gateway/clients/openai_codex/token_manager.rb +71 -0
- data/lib/llm_gateway/errors.rb +21 -0
- data/lib/llm_gateway/prompt.rb +12 -1
- data/lib/llm_gateway/provider_registry.rb +37 -0
- data/lib/llm_gateway/version.rb +1 -1
- data/lib/llm_gateway.rb +165 -14
- data/scripts/create_anthropic_credentials.rb +106 -0
- data/scripts/create_openai_codex_credentials.rb +116 -0
- data/scripts/generate_handoff_live_fixture.rb +169 -0
- data/scripts/generate_handoff_media_fixture.rb +167 -0
- metadata +64 -28
- data/lib/llm_gateway/adapters/claude/client.rb +0 -60
- data/lib/llm_gateway/adapters/groq/bidirectional_message_mapper.rb +0 -18
- data/lib/llm_gateway/adapters/groq/client.rb +0 -58
- data/lib/llm_gateway/adapters/groq/input_mapper.rb +0 -18
- data/lib/llm_gateway/adapters/groq/output_mapper.rb +0 -10
- data/lib/llm_gateway/adapters/open_ai/client.rb +0 -80
- data/lib/llm_gateway/adapters/open_ai/responses/input_mapper.rb +0 -62
- data/sample/claude_code_clone/agent.rb +0 -65
- data/sample/claude_code_clone/claude_code_clone.rb +0 -40
- data/sample/claude_code_clone/prompt.rb +0 -79
- data/sample/claude_code_clone/run.rb +0 -47
- data/sample/claude_code_clone/tools/bash_tool.rb +0 -54
- data/sample/claude_code_clone/tools/edit_tool.rb +0 -61
- data/sample/claude_code_clone/tools/grep_tool.rb +0 -113
- data/sample/claude_code_clone/tools/read_tool.rb +0 -61
- data/sample/claude_code_clone/tools/todowrite_tool.rb +0 -98
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43cc8958d5b5a190a2326517944bba603719ec1a2e7b2e621f275d9054a4d51b
|
|
4
|
+
data.tar.gz: 578c4468ba81e12ccd73760b9c04e753cbd89bafe4b81f6c2074e22de2c7a66a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 622f708bedb092c0d74793c847a642d2450be3344fa3af12591ddd7bbab49f688aed20246d315d904b687c6f6aa1a68f08888cf1d74c3598ad2873ee9a7960bf
|
|
7
|
+
data.tar.gz: b12bda099f89b25bf091b7ce0cef631545dda546e33f3d52e2e71dee055892242155652b5353f0d0a595809ab58294574835d84f15e381e494e900516f12575b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.4.0](https://github.com/Hyper-Unearthing/llm_gateway/tree/v0.4.0) (2026-05-17)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/Hyper-Unearthing/llm_gateway/compare/v0.3.0...v0.4.0)
|
|
6
|
+
|
|
7
|
+
**Merged pull requests:**
|
|
8
|
+
|
|
9
|
+
- docs: update docs new code [\#51](https://github.com/Hyper-Unearthing/llm_gateway/pull/51) ([billybonks](https://github.com/billybonks))
|
|
10
|
+
- test: rework live tests to use vcr [\#50](https://github.com/Hyper-Unearthing/llm_gateway/pull/50) ([billybonks](https://github.com/billybonks))
|
|
11
|
+
- refactor: update provider keys [\#49](https://github.com/Hyper-Unearthing/llm_gateway/pull/49) ([billybonks](https://github.com/billybonks))
|
|
12
|
+
- Refactor/major internal organisation [\#48](https://github.com/Hyper-Unearthing/llm_gateway/pull/48) ([billybonks](https://github.com/billybonks))
|
|
13
|
+
- cross provider handoff support [\#47](https://github.com/Hyper-Unearthing/llm_gateway/pull/47) ([billybonks](https://github.com/billybonks))
|
|
14
|
+
- Refactor provider usage and especially oauth [\#46](https://github.com/Hyper-Unearthing/llm_gateway/pull/46) ([billybonks](https://github.com/billybonks))
|
|
15
|
+
- Refactor/options [\#45](https://github.com/Hyper-Unearthing/llm_gateway/pull/45) ([billybonks](https://github.com/billybonks))
|
|
16
|
+
- fix: map content blocks in tools as well [\#44](https://github.com/Hyper-Unearthing/llm_gateway/pull/44) ([billybonks](https://github.com/billybonks))
|
|
17
|
+
- Streaming support [\#43](https://github.com/Hyper-Unearthing/llm_gateway/pull/43) ([billybonks](https://github.com/billybonks))
|
|
18
|
+
- feat: try to simplify api and provider combination [\#42](https://github.com/Hyper-Unearthing/llm_gateway/pull/42) ([billybonks](https://github.com/billybonks))
|
|
19
|
+
- feat: add reasoning effort parameter [\#41](https://github.com/Hyper-Unearthing/llm_gateway/pull/41) ([billybonks](https://github.com/billybonks))
|
|
20
|
+
- Feat/backport streaming [\#40](https://github.com/Hyper-Unearthing/llm_gateway/pull/40) ([billybonks](https://github.com/billybonks))
|
|
21
|
+
- fix: cache control [\#39](https://github.com/Hyper-Unearthing/llm_gateway/pull/39) ([billybonks](https://github.com/billybonks))
|
|
22
|
+
- feat: configure [\#38](https://github.com/Hyper-Unearthing/llm_gateway/pull/38) ([billybonks](https://github.com/billybonks))
|
|
23
|
+
- fix: alias clients to old classname until 1.0 [\#36](https://github.com/Hyper-Unearthing/llm_gateway/pull/36) ([billybonks](https://github.com/billybonks))
|
|
24
|
+
- refactor: adapter to split clients from adapter [\#35](https://github.com/Hyper-Unearthing/llm_gateway/pull/35) ([billybonks](https://github.com/billybonks))
|
|
25
|
+
- test: make tests less brittle when regenerating vcr [\#34](https://github.com/Hyper-Unearthing/llm_gateway/pull/34) ([billybonks](https://github.com/billybonks))
|
|
26
|
+
- Clean up gems and delete sample code [\#33](https://github.com/Hyper-Unearthing/llm_gateway/pull/33) ([billybonks](https://github.com/billybonks))
|
|
27
|
+
- feat: add clade subscription as a seperate provider [\#32](https://github.com/Hyper-Unearthing/llm_gateway/pull/32) ([billybonks](https://github.com/billybonks))
|
|
28
|
+
|
|
3
29
|
## [v0.3.0](https://github.com/Hyper-Unearthing/llm_gateway/tree/v0.3.0) (2025-08-19)
|
|
4
30
|
|
|
5
31
|
[Full Changelog](https://github.com/Hyper-Unearthing/llm_gateway/compare/v0.2.0...v0.3.0)
|