MCPcopy Create free account

hub / github.com/Alishahryar1/free-claude-code / functions

Functions3,538 in github.com/Alishahryar1/free-claude-code

↓ 495 callersMethodget
(self, url: str)
tests/api/test_admin.py:530
↓ 402 callersMethodappend
(self, text: str)
messaging/transcript/segments.py:56
↓ 150 callersMethodget
Return an existing provider or create it lazily.
providers/runtime/cache.py:33
↓ 134 callersFunctionformat_sse_event
Format one Anthropic-style SSE event.
core/anthropic/streaming/emitter.py:31
↓ 104 callersMethodget
(self, key, default=None)
tests/providers/test_converter.py:29
↓ 80 callersMethod_build_request_body
( self, request: Any, thinking_enabled: bool | None = None )
providers/zai/client.py:35
↓ 78 callersMethodstream_response
( self, request: Any, input_tokens: int = 0, *, request_id: str | None
tests/providers/test_model_validation.py:340
↓ 73 callersMethodjson
(self)
tests/contracts/test_local_provider_smoke.py:17
↓ 72 callersMethodapply
Apply a parsed CLI transcript event.
messaging/transcript/buffer.py:49
↓ 71 callersFunctionparse_sse_text
(text: str)
core/anthropic/stream_contracts.py:75
↓ 67 callersMethodresolve
(self, claude_model_name: str)
api/model_router.py:44
↓ 53 callersFunctioncreate_app
Create and configure the FastAPI application.
api/app.py:87
↓ 50 callersFunctiontrace_event
Emit one structured TRACE row (merged into JSON by the log sink).
core/trace.py:50
↓ 43 callersFunction_make_incoming
Create a minimal IncomingMessage for testing.
tests/messaging/test_tree_concurrency.py:12
↓ 42 callersMethodget_node
(self, node_id: str)
messaging/trees/runtime.py:62
↓ 41 callersMethodget_tree_for_node
Get the tree containing a given node.
messaging/trees/manager.py:115
↓ 40 callersMethodcreate_tree
Create a new tree with a root node. Args: node_id: ID for the root node incoming: The incoming message
messaging/trees/manager.py:40
↓ 37 callersFunctionparse_cli_event
Parse a CLI event and return a structured result. Args: event: Raw event dictionary from CLI log_raw_cli: When True, log ful
messaging/event_parser.py:12
↓ 36 callersMethodget_instance
Get the singleton instance of the limiter. ``rate_limit`` and ``rate_window`` apply only when the singleton is first created. Call :m
messaging/limiter.py:36
↓ 34 callersFunction_make_provider
Create a provider instance for testing.
tests/providers/test_streaming_errors.py:61
↓ 34 callersFunctionincoming_message_factory
()
tests/conftest.py:156
↓ 32 callersMethodconvert_messages
( messages: list[Any], *, reasoning_replay: ReasoningReplayMode = ReasoningReplayMode.
core/anthropic/conversion.py:152
↓ 31 callersFunction_make_chunk
Create a mock streaming chunk.
tests/providers/test_streaming_errors.py:95
↓ 31 callersMethodcount
Count tokens for a request after applying configured model routing.
api/handlers/token_count.py:39
↓ 31 callersMethodfeed
Feed text and return safe text plus detected tool calls.
core/anthropic/tools.py:96
↓ 31 callersMethodreset_instance
Reset singleton (for testing).
providers/rate_limit.py:150
↓ 30 callersMethodadd
( self, *, nodeid: str, outcome: str, duration_s: float, marke
smoke/lib/report.py:28
↓ 30 callersMethodadd_to_tree
Add a reply as a child node to an existing tree. Args: parent_node_id: ID of the parent message node_id: ID
messaging/trees/manager.py:71
↓ 27 callersMethodadd_node
( self, node_id: str, incoming: IncomingMessage, status_message_id: str,
messaging/trees/runtime.py:47
↓ 27 callersFunctionextract_command_prefix
Extract the command prefix for fast prefix detection. Parses a shell command safely, handling environment variables and command injection att
api/command_utils.py:25
↓ 27 callersFunctionget_block_attr
Get an attribute from a Pydantic model, lightweight object, or dict.
core/anthropic/content.py:6
↓ 27 callersMethodhandle_message
Main entry point for handling an incoming platform message.
messaging/workflow.py:111
↓ 26 callersFunction_make_request
Create a mock request with all fields build_request_body needs.
tests/providers/test_streaming_errors.py:90
↓ 26 callersMethodclear
(self)
messaging/session/message_log.py:73
↓ 25 callersMethodupdate
Render transcript + optional status line and edit the platform message.
messaging/ui_updates.py:50
↓ 24 callersMethodenqueue
(self, node_id: str)
messaging/trees/runtime.py:92
↓ 24 callersMethodfeed
Feed content and yield parsed chunks.
core/anthropic/thinking.py:42
↓ 24 callersFunctionget_token_count
Estimate token count for a request.
core/anthropic/tokens.py:19
↓ 24 callersMethodrender
(self, ctx: RenderCtx, *, limit_chars: int, status: str | None)
messaging/transcript/buffer.py:98
↓ 23 callersFunction_parse_sse
Parse an SSE event string into its data payload.
tests/providers/test_stream_ledger.py:13
↓ 22 callersFunction_local_client
(app)
tests/api/test_admin.py:15
↓ 22 callersFunctionextract_text_from_content
Extract concatenated text from message content.
core/anthropic/content.py:20
↓ 22 callersFunctionget_settings
Get cached settings instance.
config/settings.py:385
↓ 22 callersMethodmodel_dump
(self, exclude_none=True)
tests/providers/test_ollama.py:38
↓ 22 callersFunctionoptional_str
(value: Any)
core/openai_responses/tools.py:260
↓ 21 callersFunction_collect_stream
Collect all SSE events from a stream.
tests/providers/test_streaming_errors.py:126
↓ 21 callersFunctionescape_md_v2
Escape text for Telegram MarkdownV2.
messaging/rendering/telegram_markdown.py:19
↓ 20 callersFunction_set_home
(monkeypatch, tmp_path: Path)
tests/api/test_admin.py:19
↓ 20 callersMethodflush
Flush any remaining tool call in the buffer.
core/anthropic/tools.py:188
↓ 20 callersMethodsave_tree_snapshot
(self, snapshot: TreeSnapshot)
messaging/session/store.py:93
↓ 19 callersMethodload_conversation_snapshot
(self)
messaging/session/store.py:84
↓ 19 callersFunctionparse_provider_type
Extract provider type from any 'provider/model' string.
config/model_refs.py:26
↓ 18 callersFunction_aiter
(chunks: list[str])
tests/core/openai_responses/test_sse.py:434
↓ 18 callersFunction_make_tool_assembler
(provider: NvidiaNimProvider)
tests/providers/test_streaming_errors.py:72
↓ 18 callersFunction_make_tree
Create a tree with a single root node.
tests/messaging/test_tree_concurrency.py:23
↓ 18 callersMethodenqueue
Enqueue a node for processing. If the tree is not busy, processing starts immediately. If busy, the message is queued.
messaging/trees/manager.py:135
↓ 18 callersMethodprocess_tool_call
Process a single tool-call delta and yield Anthropic SSE events.
providers/transports/openai_chat/tool_calls.py:98
↓ 18 callersMethodstream
( self, payload: dict[str, Any], *, headers: dict[str, str] | None = None,
smoke/lib/e2e.py:114
↓ 17 callersFunction_clear_process_config
(monkeypatch)
tests/api/test_admin.py:25
↓ 17 callersMethod_is_thinking_enabled
Return whether thinking should be enabled for this request.
providers/base.py:40
↓ 17 callersFunction_smoke_config
(**overrides)
tests/contracts/test_smoke_config.py:54
↓ 17 callersFunctionassert_anthropic_stream_contract
Check minimal Anthropic-style SSE invariants: start/stop, block nesting. Does *not* assert strict event ordering (e.g. :class:`message_delta` vs
core/anthropic/stream_contracts.py:97
↓ 17 callersFunctionmake_outcome
Build one report outcome from a CLI run and its server log delta.
smoke/lib/claude_cli_matrix.py:334
↓ 17 callersFunctionmap_error
Map OpenAI or HTTPX exception to specific ProviderError. Streaming transports should pass their scoped limiter (``self._global_rate_limiter``)
providers/error_mapping.py:257
↓ 17 callersMethodrun
(self)
smoke/lib/e2e.py:70
↓ 17 callersMethodrun
(self)
tests/cli/test_entrypoints.py:243
↓ 16 callersFunction_count_text_tokens
(text: str)
core/anthropic/tokens.py:15
↓ 16 callersMethodevent
(self, event_type: str, data: dict[str, Any])
core/anthropic/streaming/emitter.py:42
↓ 16 callersFunctionformat_native_sse_event
Format an SSE event from its event name and data payload.
core/anthropic/native_sse_block_policy.py:44
↓ 16 callersMethodingest_native_event
Record a native Anthropic SSE event and re-emit its normalized shape.
core/anthropic/streaming/ledger.py:405
↓ 16 callersMethodupdate_state
( self, state: MessageState, *, session_id: str | None = None, error_m
messaging/trees/node.py:41
↓ 15 callersFunction_ctx
()
tests/messaging/test_transcript.py:14
↓ 15 callersFunction_settings
(**overrides)
tests/contracts/test_smoke_config.py:25
↓ 15 callersFunctionconfigure_logging
Configure loguru with JSON output to log_file and intercept stdlib logging. Idempotent: skips if already configured (e.g. hot reload). Use fo
config/logging_config.py:107
↓ 15 callersMethodcreate
Create an Anthropic-compatible message response.
api/handlers/messages.py:65
↓ 15 callersMethodemit_text_delta
(self, content: str)
core/anthropic/streaming/ledger.py:317
↓ 15 callersFunctionextract_managed_claude_session_id
Extract a Claude Code session ID from supported stream-json event shapes.
cli/managed/claude.py:191
↓ 15 callersFunctionformat_response_sse_event
Format one OpenAI Responses SSE event.
core/openai_responses/events.py:16
↓ 15 callersMethodmessage_delta
( self, stop_reason: str, output_tokens: int | None, *, usage_fields:
core/anthropic/streaming/ledger.py:210
↓ 15 callersFunctionparse_model_name
Extract model name from any 'provider/model' string.
config/model_refs.py:32
↓ 15 callersMethodsend
( self, text: str, *, message_id: str | None = None, reply_to: str | N
smoke/lib/e2e.py:524
↓ 14 callersFunction_braced_body
(text: str, declaration: str)
tests/scripts/test_installers.py:16
↓ 14 callersFunction_make_request
Create a MessagesRequest with a single user message.
tests/api/test_optimization_handlers.py:17
↓ 14 callersFunction_repo_root
()
tests/scripts/test_ci_scripts.py:9
↓ 14 callersFunction_repo_root
()
tests/scripts/test_uninstallers.py:10
↓ 14 callersMethodemit_thinking_delta
(self, content: str)
core/anthropic/streaming/ledger.py:303
↓ 14 callersMethodencode
( self, text: str, *, disallowed_special: tuple[str, ...] )
core/openai_responses/usage.py:11
↓ 14 callersMethodprocess_node
Core task processor for a single CLI interaction.
messaging/node_runner.py:73
↓ 14 callersMethodregister_node
Register a node ID to a tree (for external mapping).
messaging/trees/manager.py:337
↓ 14 callersFunctionrender_markdown_to_discord
Render common Markdown into Discord-compatible format.
messaging/rendering/discord_markdown.py:55
↓ 14 callersMethodstart_task
Start a new task or continue an existing session. Args: prompt: The user's message/prompt session_id: Option
cli/managed/session.py:91
↓ 14 callersMethodto_anthropic_payload
(self, request: Mapping[str, Any])
core/openai_responses/adapter.py:20
↓ 13 callersFunction_app_settings
Minimal settings namespace for AppRuntime (matches typed :class:`Settings` fields used).
tests/api/test_app_lifespan_and_errors.py:38
↓ 13 callersFunctionbyId
(id)
api/admin_static/admin.js:34
↓ 13 callersMethodcontent_block_delta
(self, index: int, delta_type: str, content: str)
core/anthropic/streaming/ledger.py:270
↓ 13 callersFunctioncreate_messaging_components
Create runtime/outbound components for the configured messaging platform.
messaging/platforms/factory.py:31
↓ 13 callersFunctionescape_discord
Escape text for Discord markdown (bold, italic, etc.).
messaging/rendering/discord_markdown.py:19
↓ 13 callersMethodestimate_output_tokens
(self)
core/anthropic/streaming/ledger.py:589
↓ 13 callersFunctionformat_exception_for_log
Return exception type and optionally ``str(exc)`` for operator diagnostics.
messaging/safe_diagnostics.py:6
↓ 13 callersFunctionget_user_facing_error_message
Return a readable, non-empty error message for users. Known transport and OpenAI SDK exception types are mapped to stable wording before fall
core/anthropic/errors.py:7
next →1–100 of 3,538, ranked by callers