Skip to content

Commit b6b3e4d

Browse files
committed
first commit
0 parents  commit b6b3e4d

File tree

11 files changed

+586
-0
lines changed

11 files changed

+586
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release Plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v5
22+
with:
23+
node-version: 22
24+
cache: "pnpm"
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Build plugin
30+
run: pnpm run build
31+
32+
- name: Package plugin
33+
run: pnpm run package
34+
35+
- name: Create Release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
files: '*.zip'
39+
draft: false
40+
prerelease: false
41+
generate_release_notes: true
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
*.zip
7+
8+
# Logs
9+
logs
10+
*.log
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.vscode/*
18+
!.vscode/extensions.json
19+
.idea
20+
.DS_Store
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?
26+
27+
# Environment variables
28+
.env
29+
.env.local
30+
.env.*.local
31+
32+
# Temporary files
33+
*.tmp
34+
*.temp
35+
.cache
36+
37+
# OS files
38+
Thumbs.db

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
All notable changes to the OpenAI Provider Plugin will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2025-10-28
9+
10+
### Added
11+
- Initial release of OpenAI Provider Plugin
12+
- Support for all GPT models (GPT-3.5, GPT-4, GPT-4 Turbo, GPT-4o)
13+
- Support for reasoning models (o1, o3)
14+
- Vision capabilities for compatible models
15+
- Function calling support
16+
- Custom base URL configuration
17+
- Organization ID support
18+
- Automatic model fetching from OpenAI API
19+
- Model capability detection (vision, function calling, reasoning)
20+
- Connection testing and authentication validation
21+
- Comprehensive error handling with specific error messages
22+
23+
[1.0.0]: https://github.com/302ai/openai-plugin/releases/tag/v1.0.0

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 302.AI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# OpenAI Provider Plugin for 302 AI Studio
2+
3+
Official OpenAI API provider plugin for [302 AI Studio](https://github.com/302ai/302-AI-Studio-SV).
4+
5+
## Features
6+
7+
- 🚀 Support for all GPT models (GPT-3.5, GPT-4, GPT-4 Turbo, GPT-4o)
8+
- 🧠 Support for reasoning models (o1, o3)
9+
- 👁️ Vision capabilities (GPT-4 Vision, GPT-4o)
10+
- 🔧 Function calling support
11+
- 🌐 Custom base URL support (for proxies)
12+
- 🏢 Organization ID support
13+
14+
## Installation
15+
16+
### Via Plugin Marketplace
17+
18+
1. Open 302 AI Studio
19+
2. Go to Settings → Plugins → Marketplace
20+
3. Search for "OpenAI Provider"
21+
4. Click "Install"
22+
23+
### Manual Installation
24+
25+
1. Download the latest `.zip` file from [Releases](https://github.com/302ai/openai-plugin/releases)
26+
2. In 302 AI Studio, go to Settings → Plugins
27+
3. Click "Install from File" and select the downloaded ZIP
28+
29+
## Configuration
30+
31+
After installation, configure the plugin:
32+
33+
1. Go to Settings → Providers
34+
2. Select "OpenAI" provider
35+
3. Enter your OpenAI API key
36+
4. (Optional) Configure custom base URL or organization ID
37+
38+
### Configuration Options
39+
40+
- **API Key** (required): Your OpenAI API key from [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
41+
- **Base URL** (optional): Custom API endpoint (default: `https://api.openai.com/v1`)
42+
- **Organization ID** (optional): Your OpenAI organization ID for multi-org accounts
43+
44+
## Supported Models
45+
46+
This plugin automatically fetches and supports all available GPT models from your OpenAI account, including:
47+
48+
- GPT-4o and GPT-4o mini
49+
- GPT-4 Turbo and GPT-4
50+
- GPT-3.5 Turbo
51+
- o1 and o3 (reasoning models)
52+
53+
## Development
54+
55+
### Prerequisites
56+
57+
- Node.js 20+
58+
- pnpm 8+
59+
60+
### Setup
61+
62+
```bash
63+
# Install dependencies
64+
pnpm install
65+
66+
# Build plugin
67+
pnpm run build
68+
69+
# Package as ZIP
70+
pnpm run package
71+
```
72+
73+
### Project Structure
74+
75+
```
76+
openai-plugin/
77+
├── src/
78+
│ └── index.ts # Plugin implementation
79+
├── dist/ # Compiled output (generated)
80+
├── plugin.json # Plugin metadata
81+
├── package.json
82+
├── tsconfig.json
83+
├── tsup.config.ts
84+
└── scripts/
85+
└── package.js # ZIP packaging script
86+
```
87+
88+
## License
89+
90+
MIT License - see [LICENSE](LICENSE) file for details.
91+
92+
## Links
93+
94+
- [302 AI Studio](https://github.com/302ai/302-AI-Studio-SV)
95+
- [Plugin SDK Documentation](https://github.com/302ai/302-AI-Studio-SV/tree/main/packages/plugin-sdk)
96+
- [OpenAI Documentation](https://platform.openai.com/docs)
97+
- [Report Issues](https://github.com/302ai/openai-plugin/issues)

package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "@302ai/anthropic-plugin",
3+
"version": "1.0.0",
4+
"description": "Anthropic provider plugin for 302 AI Studio",
5+
"type": "module",
6+
"main": "./dist/index.js",
7+
"types": "./dist/index.d.ts",
8+
"files": [
9+
"dist",
10+
"plugin.json",
11+
"README.md"
12+
],
13+
"scripts": {
14+
"build": "tsup",
15+
"dev": "tsup --watch",
16+
"clean": "rm -rf dist",
17+
"package": "pnpm run build && node scripts/package.js"
18+
},
19+
"keywords": [
20+
"302ai",
21+
"plugin",
22+
"anthropic",
23+
"provider",
24+
"claude",
25+
"ai"
26+
],
27+
"packageManager": "pnpm@10.9.0",
28+
"author": "302.AI",
29+
"license": "MIT",
30+
"repository": {
31+
"type": "git",
32+
"url": "https://github.com/302ai/anthropic-plugin.git"
33+
},
34+
"bugs": {
35+
"url": "https://github.com/302ai/anthropic-plugin/issues"
36+
},
37+
"homepage": "https://github.com/302ai/anthropic-plugin#readme",
38+
"peerDependencies": {
39+
"@302ai/studio-plugin-sdk": "^1.0.0"
40+
},
41+
"devDependencies": {
42+
"@302ai/studio-plugin-sdk": "^1.0.0",
43+
"@types/node": "^22.0.0",
44+
"archiver": "^7.0.0",
45+
"tsup": "^8.0.0",
46+
"typescript": "^5.6.0"
47+
}
48+
}

plugin.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"id": "com.302ai.provider.anthropic",
3+
"name": "Anthropic Provider",
4+
"version": "1.0.0",
5+
"type": "provider",
6+
"description": "Anthropic API provider plugin for Claude models",
7+
"author": "302.AI",
8+
"homepage": "https://github.com/302ai/anthropic-plugin",
9+
"repository": "https://github.com/302ai/anthropic-plugin",
10+
"permissions": ["network", "storage"],
11+
"compatibleVersion": ">=0.1.0",
12+
"main": "main/index.js",
13+
"tags": ["provider", "anthropic", "claude", "ai"],
14+
"defaultConfig": {
15+
"apiKey": "",
16+
"baseUrl": "https://api.anthropic.com"
17+
},
18+
"configSchema": {
19+
"type": "object",
20+
"properties": {
21+
"apiKey": {
22+
"type": "string",
23+
"title": "API Key",
24+
"description": "Your Anthropic API key"
25+
},
26+
"baseUrl": {
27+
"type": "string",
28+
"title": "Base URL",
29+
"description": "API base URL (for proxies or custom endpoints)",
30+
"default": "https://api.anthropic.com"
31+
}
32+
},
33+
"required": ["apiKey"]
34+
}
35+
}

0 commit comments

Comments
 (0)