Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
d1079827
Commit
d1079827
authored
Apr 03, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start refactoring
parent
61ecc606
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
877 additions
and
883 deletions
+877
-883
__init__.py
aisbf/__init__.py
+5
-0
__init__.py
aisbf/auth/__init__.py
+29
-0
kiro.py
aisbf/auth/kiro.py
+0
-0
__init__.py
aisbf/providers/__init__.py
+10
-872
__init__.py
aisbf/providers/kiro/__init__.py
+36
-0
converters.py
aisbf/providers/kiro/converters.py
+0
-0
converters_openai.py
aisbf/providers/kiro/converters_openai.py
+3
-3
handler.py
aisbf/providers/kiro/handler.py
+783
-0
models.py
aisbf/providers/kiro/models.py
+0
-0
parsers.py
aisbf/providers/kiro/parsers.py
+0
-0
utils.py
aisbf/providers/kiro/utils.py
+0
-0
pyproject.toml
pyproject.toml
+1
-1
setup.py
setup.py
+10
-7
No files found.
aisbf/__init__.py
View file @
d1079827
...
...
@@ -43,6 +43,8 @@ from .providers import (
get_provider_handler
,
PROVIDER_HANDLERS
)
from
.providers.kiro
import
KiroProviderHandler
from
.auth.kiro
import
KiroAuthManager
from
.handlers
import
RequestHandler
,
RotationHandler
,
AutoselectHandler
from
.utils
import
count_messages_tokens
,
split_messages_into_chunks
,
get_max_request_tokens_for_model
...
...
@@ -71,8 +73,11 @@ __all__ = [
"OpenAIProviderHandler"
,
"AnthropicProviderHandler"
,
"OllamaProviderHandler"
,
"KiroProviderHandler"
,
"get_provider_handler"
,
"PROVIDER_HANDLERS"
,
# Auth
"KiroAuthManager"
,
# Handlers
"RequestHandler"
,
"RotationHandler"
,
...
...
aisbf/auth/__init__.py
0 → 100644
View file @
d1079827
"""
Copyleft (C) 2026 Stefy Lanza <stefy@nexlab.net>
AISBF - AI Service Broker Framework || AI Should Be Free
Authentication modules for AISBF providers.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Why did the programmer quit his job? Because he didn't get arrays!
"""
from
.kiro
import
KiroAuthManager
,
AuthType
__all__
=
[
"KiroAuthManager"
,
"AuthType"
,
]
aisbf/
kiro_auth
.py
→
aisbf/
auth/kiro
.py
View file @
d1079827
File moved
aisbf/providers.py
→
aisbf/providers
/__init__
.py
View file @
d1079827
This diff is collapsed.
Click to expand it.
aisbf/providers/kiro/__init__.py
0 → 100644
View file @
d1079827
"""
Copyleft (C) 2026 Stefy Lanza <stefy@nexlab.net>
AISBF - AI Service Broker Framework || AI Should Be Free
Kiro provider package - Direct Kiro API integration (Amazon Q Developer).
This package contains:
- handler: KiroProviderHandler for API requests
- converters: Core format converters (OpenAI/Anthropic → Kiro)
- converters_openai: OpenAI-specific adapter layer
- models: Data models for Kiro converters
- parsers: AWS Event Stream parser
- utils: Utility functions
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Why did the programmer quit his job? Because he didn't get arrays!
"""
from
.handler
import
KiroProviderHandler
__all__
=
[
"KiroProviderHandler"
,
]
aisbf/
kiro_
converters.py
→
aisbf/
providers/kiro/
converters.py
View file @
d1079827
File moved
aisbf/
kiro_
converters_openai.py
→
aisbf/
providers/kiro/
converters_openai.py
View file @
d1079827
...
...
@@ -37,7 +37,7 @@ from typing import Any, Dict, List, Optional, Tuple
logger
=
logging
.
getLogger
(
__name__
)
# Import Kiro models for type hints
from
.
kiro_
models
import
ChatMessage
,
Tool
from
.models
import
ChatMessage
,
Tool
# Hidden models - not returned by Kiro /ListAvailableModels API but still functional.
# These need special internal IDs that differ from their display names.
...
...
@@ -147,7 +147,7 @@ def get_model_id_for_kiro(model: str, hidden_models: dict) -> str:
return
hidden_models
.
get
(
normalized
,
normalized
)
# Import from core - reuse shared logic
from
.
kiro_
converters
import
(
from
.converters
import
(
extract_text_content
,
extract_images_from_content
,
UnifiedMessage
,
...
...
@@ -431,7 +431,7 @@ def build_kiro_payload_from_dict(
Raises:
ValueError: If there are no messages to send
"""
from
.
kiro_
models
import
create_chat_completion_request
from
.models
import
create_chat_completion_request
# Convert dicts to dataclasses
request_data
=
create_chat_completion_request
(
...
...
aisbf/providers/kiro/handler.py
0 → 100644
View file @
d1079827
This diff is collapsed.
Click to expand it.
aisbf/
kiro_
models.py
→
aisbf/
providers/kiro/
models.py
View file @
d1079827
File moved
aisbf/
kiro_
parsers.py
→
aisbf/
providers/kiro/
parsers.py
View file @
d1079827
File moved
aisbf/
kiro_
utils.py
→
aisbf/
providers/kiro/
utils.py
View file @
d1079827
File moved
pyproject.toml
View file @
d1079827
...
...
@@ -48,7 +48,7 @@ Documentation = "https://git.nexlab.net/nexlab/aisbf.git"
"Bug
Tracker"
=
"https://git.nexlab.net/nexlab/aisbf.git/issues"
[tool.setuptools]
packages
=
["aisbf"]
packages
=
[
"aisbf"
,
"aisbf.auth"
,
"aisbf.providers"
,
"aisbf.providers.kiro"
]
py-modules
=
["cli"]
[tool.setuptools.package-data]
...
...
setup.py
View file @
d1079827
...
...
@@ -98,19 +98,22 @@ setup(
'aisbf/__init__.py'
,
'aisbf/config.py'
,
'aisbf/models.py'
,
'aisbf/providers.py'
,
'aisbf/providers
/__init__
.py'
,
'aisbf/handlers.py'
,
'aisbf/context.py'
,
'aisbf/utils.py'
,
'aisbf/database.py'
,
'aisbf/mcp.py'
,
'aisbf/tor.py'
,
'aisbf/kiro_auth.py'
,
'aisbf/kiro_converters.py'
,
'aisbf/kiro_converters_openai.py'
,
'aisbf/kiro_models.py'
,
'aisbf/kiro_parsers.py'
,
'aisbf/kiro_utils.py'
,
'aisbf/auth/__init__.py'
,
'aisbf/auth/kiro.py'
,
'aisbf/providers/kiro/__init__.py'
,
'aisbf/providers/kiro/handler.py'
,
'aisbf/providers/kiro/converters.py'
,
'aisbf/providers/kiro/converters_openai.py'
,
'aisbf/providers/kiro/models.py'
,
'aisbf/providers/kiro/parsers.py'
,
'aisbf/providers/kiro/utils.py'
,
'aisbf/claude_auth.py'
,
'aisbf/semantic_classifier.py'
,
'aisbf/batching.py'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment